@@ -140,7 +140,7 @@ static std::vector<std::string> splitString(const std::string &line)
140140 pos2 = line.find (' \" ' , pos1+1 );
141141 else if (line[pos1] == ' \' ' ) {
142142 pos2 = line.find (' \' ' , pos1+1 );
143- if (pos2 < static_cast < int >( line.size () ) - 3 && line.compare (pos2, 3 , " \' :\' " , 0 , 3 ) == 0 )
143+ if (pos2 < line.size () - 3 && line.compare (pos2, 3 , " \' :\' " , 0 , 3 ) == 0 )
144144 pos2 = line.find (' \' ' , pos2 + 3 );
145145 } else {
146146 pos2 = pos1;
@@ -357,7 +357,7 @@ namespace clangimport {
357357 /* *
358358 * @throws InternalError thrown if index is out of bounds
359359 */
360- AstNodePtr getChild (int c) {
360+ AstNodePtr getChild (size_t c) {
361361 if (c >= children.size ()) {
362362 std::ostringstream err;
363363 err << " ClangImport: AstNodePtr::getChild(" << c << " ) out of bounds. children.size=" << children.size () << " " << nodeType;
@@ -509,7 +509,7 @@ void clangimport::AstNode::dumpAst(int num, int indent) const
509509 for (const auto & tok: mExtTokens )
510510 std::cout << " " << tok;
511511 std::cout << std::endl;
512- for (int c = 0 ; c < children.size (); ++c) {
512+ for (size_t c = 0 ; c < children.size (); ++c) {
513513 if (children[c])
514514 children[c]->dumpAst (c, indent + 2 );
515515 else
@@ -1432,7 +1432,7 @@ void clangimport::AstNode::createTokensFunctionDecl(TokenList &tokenList)
14321432 function->nestedIn = nestedIn;
14331433 function->argDef = par1;
14341434 // Function arguments
1435- for (int i = 0 ; i < children.size (); ++i) {
1435+ for (size_t i = 0 ; i < children.size (); ++i) {
14361436 AstNodePtr child = children[i];
14371437 if (child->nodeType != ParmVarDecl)
14381438 continue ;
@@ -1657,7 +1657,7 @@ void clangimport::parseClangAstDump(Tokenizer &tokenizer, std::istream &f)
16571657 continue ;
16581658 }
16591659
1660- const int level = (pos1 - 1 ) / 2 ;
1660+ const size_t level = (pos1 - 1 ) / 2 ;
16611661 if (level == 0 || level > tree.size ())
16621662 continue ;
16631663
0 commit comments