// restore original character suppresed by terminating zero
*(cur + len) = tmp;
- return ( i != __gMultiLangMap.end() );
+ return i == __gMultiLangMap.end() ? false : true;
}
static inline void get_string_between( char* start, char* end,
spFile* pTopCtx = new spFile();
mpCurCtx = pTopCtx;
- mIsVirtaul = 0;
+ mIsVirtual = 0;
mIsTemplate = 0;
mNestingLevel = 0;
) == 0
)
{
- int o;
+ int o = 0;
++o;
}
default: break;
}
- if ( is_keyword( cur ) )
+ // 'const' is a part of the return type, not a keyword here
+ if ( strncmp(cur, "const", 5) != 0 && is_keyword( cur ) )
{
// parses, token, if token identifies
// the container context (e.g. class/namespace)
if ( cmp_tokens_fast( cur, "virtual", len ) )
{
// probably the virtual method is in front of us;
- mIsVirtaul = 1;
+ mIsVirtual = 1;
skip_token( cur );
return;
}
char* start = cur;
+ bool isVirtual = false;
while( *cur != '(' )
{
+ if ( get_token_str( cur ) == "virtual" )
+ isVirtual = true;
+
skip_token( cur );
if ( !get_next_token( cur ) ) return FALSE;
}
mpCurCtx->AddMember( pOp );
pOp->mVisibility = mCurVis;
+ pOp->mIsVirtual = isVirtual;
// add comments about operation
AttachComments( *pOp, cur );
if ( blocksSkipped == 0 )
{
if ( *cur == 10 ) ++_gLineNo;
- ++cur;
+ ++cur; // skip ')'
+
break; // function without paramters
}
} while(1);
+ // skip possible whitespace between ')' and following "const"
+ while ( isspace(*cur) )
+ cur++;
+
// check if it was really a function not a macro,
// if so, than it should be terminated with semicolon ';'
// or opening implemenetaton bracket '{'
if ( cmp_tokens_fast( tok, "const", 5 ) )
{
+ ((spOperation*)mpCurCtx)->mIsConstant = true;
+
skip_token(tok);
if ( !get_next_token(tok) ) return FALSE;
continue;