Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    r312029a rc36298d  
    99// Author           : Aaron B. Moss
    1010// Created On       : Wed May 15 17:00:00 2019
    11 // Last Modified By : Peter A. Buhr
     11// Last Modified By : Andrew Beach
    1212// Created On       : Thr Jun 13 13:38:00 2019
    13 // Update Count     : 6
     13// Update Count     : 2
    1414//
    1515
     
    141141// --- KeywordCastExpr
    142142
    143 const char * KeywordCastExpr::targetString() const {
    144         return AggregateDecl::aggrString( target );
     143const std::string & KeywordCastExpr::targetString() const {
     144        static const std::string targetStrs[] = {
     145                "coroutine", "thread", "monitor"
     146        };
     147        static_assert(
     148                (sizeof(targetStrs) / sizeof(targetStrs[0])) == ((unsigned long)NUMBER_OF_TARGETS),
     149                "Each KeywordCastExpr::Target should have a corresponding string representation"
     150        );
     151        return targetStrs[(unsigned long)target];
    145152}
    146153
Note: See TracChangeset for help on using the changeset viewer.