diff --git a/CheckHeaders.cpp b/CheckHeaders.cpp index d1fb7f04d..80c4ce60c 100644 --- a/CheckHeaders.cpp +++ b/CheckHeaders.cpp @@ -90,14 +90,21 @@ void WarningIncludeHeader() indentlevel++; else if (tok1->str[0] == '}') - indentlevel--; - + { + if (indentlevel > 0) + indentlevel--; + } + if (indentlevel != 0) continue; + // namespace.. + if (match(tok1,"namespace var {")) + tok1 = gettok(tok1,2); + // Class or namespace declaration.. // -------------------------------------- - if (match(tok1,"class var {") || match(tok1,"class var :") || match(tok1,"namespace var {")) + else if (match(tok1,"class var {") || match(tok1,"class var :")) classlist.push_back(getstr(tok1, 1)); // Variable declaration.. @@ -126,8 +133,8 @@ void WarningIncludeHeader() tok1 = tok1->next; } } - - // function.. + + // function.. // -------------------------------------- else if (match(tok1,"type var (")) namelist.push_back(getstr(tok1, 1)); @@ -199,7 +206,21 @@ void WarningIncludeHeader() } if ( ! NeedDeclaration ) - NeedDeclaration = (std::find(classlist.begin(),classlist.end(),tok1->str ) != classlist.end()); + { + if (std::find(classlist.begin(),classlist.end(),tok1->str ) != classlist.end()) + { + if ( strcmp(getstr(tok1, 1), "*") == 0 ) + { + NeedDeclaration = true; + } + + else + { + Needed = true; + break; + } + } + } }