@@ -611,7 +611,7 @@ static void portabilityBackslash(simplecpp::OutputList *outputList, const std::v
611
611
err.type = simplecpp::Output::PORTABILITY_BACKSLASH;
612
612
err.location = location;
613
613
err.msg = " Combination 'backslash space newline' is not portable." ;
614
- outputList->push_back (err);
614
+ outputList->push_back (std::move ( err) );
615
615
}
616
616
617
617
static bool isStringLiteralPrefix (const std::string &str)
@@ -855,7 +855,7 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
855
855
err.type = Output::SYNTAX_ERROR;
856
856
err.location = location;
857
857
err.msg = " Raw string missing terminating delimiter." ;
858
- outputList->push_back (err);
858
+ outputList->push_back (std::move ( err) );
859
859
}
860
860
return ;
861
861
}
@@ -1397,7 +1397,7 @@ std::string simplecpp::TokenList::readUntil(Stream &stream, const Location &loca
1397
1397
err.type = Output::SYNTAX_ERROR;
1398
1398
err.location = location;
1399
1399
err.msg = std::string (" No pair for character (" ) + start + " ). Can't process file. File is either invalid or unicode, which is currently not supported." ;
1400
- outputList->push_back (err);
1400
+ outputList->push_back (std::move ( err) );
1401
1401
}
1402
1402
return " " ;
1403
1403
}
@@ -2178,7 +2178,7 @@ namespace simplecpp {
2178
2178
if (it != macros.end () && !partok->isExpandedFrom (&it->second ) && (partok->str () == name () || expandedmacros.find (partok->str ()) == expandedmacros.end ())) {
2179
2179
std::set<TokenString> expandedmacros2 (expandedmacros); // temporary amnesia to allow reexpansion of currently expanding macros during argument evaluation
2180
2180
expandedmacros2.erase (name ());
2181
- partok = it->second .expand (output, loc, partok, macros, expandedmacros2);
2181
+ partok = it->second .expand (output, loc, partok, macros, std::move ( expandedmacros2) );
2182
2182
} else {
2183
2183
output->push_back (newMacroToken (partok->str (), loc, isReplaced (expandedmacros), partok));
2184
2184
output->back ()->macro = partok->macro ;
@@ -3137,7 +3137,7 @@ simplecpp::FileDataCache simplecpp::load(const simplecpp::TokenList &rawtokens,
3137
3137
err.type = simplecpp::Output::EXPLICIT_INCLUDE_NOT_FOUND;
3138
3138
err.location = Location (filenames);
3139
3139
err.msg = " Can not open include file '" + filename + " ' that is explicitly included." ;
3140
- outputList->push_back (err);
3140
+ outputList->push_back (std::move ( err) );
3141
3141
}
3142
3142
continue ;
3143
3143
}
@@ -3210,7 +3210,7 @@ static bool preprocessToken(simplecpp::TokenList &output, const simplecpp::Token
3210
3210
out.type = simplecpp::Output::SYNTAX_ERROR;
3211
3211
out.location = err.location ;
3212
3212
out.msg = " failed to expand \' " + tok->str () + " \' , " + err.what ;
3213
- outputList->push_back (out);
3213
+ outputList->push_back (std::move ( out) );
3214
3214
}
3215
3215
return false ;
3216
3216
}
@@ -3397,7 +3397,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
3397
3397
err.msg += tok->str ();
3398
3398
}
3399
3399
err.msg = ' #' + rawtok->str () + ' ' + err.msg ;
3400
- outputList->push_back (err);
3400
+ outputList->push_back (std::move ( err) );
3401
3401
}
3402
3402
if (rawtok->str () == ERROR) {
3403
3403
output.clear ();
@@ -3557,7 +3557,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
3557
3557
out.type = Output::SYNTAX_ERROR;
3558
3558
out.location = rawtok->location ;
3559
3559
out.msg = " failed to evaluate " + std::string (rawtok->str () == IF ? " #if" : " #elif" ) + " condition" ;
3560
- outputList->push_back (out);
3560
+ outputList->push_back (std::move ( out) );
3561
3561
}
3562
3562
output.clear ();
3563
3563
return ;
@@ -3736,7 +3736,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
3736
3736
mu.macroName = macro.name ();
3737
3737
mu.macroLocation = macro.defineLocation ();
3738
3738
mu.useLocation = *usageIt;
3739
- macroUsage->push_back (mu );
3739
+ macroUsage->push_back (std::move (mu) );
3740
3740
}
3741
3741
}
3742
3742
}
0 commit comments