@@ -127,7 +127,7 @@ static bool parseInlineSuppressionCommentToken(const simplecpp::Token *tok, std:
127127 return true ;
128128}
129129
130- static void inlineSuppressions (const simplecpp::TokenList &tokens, Settings &mSettings , std::list<BadInlineSuppression> *bad)
130+ static void addinlineSuppressions (const simplecpp::TokenList &tokens, Settings &mSettings , std::list<BadInlineSuppression> *bad)
131131{
132132 for (const simplecpp::Token *tok = tokens.cfront (); tok; tok = tok->next ) {
133133 if (!tok->comment )
@@ -187,10 +187,10 @@ void Preprocessor::inlineSuppressions(const simplecpp::TokenList &tokens)
187187 if (!mSettings .inlineSuppressions )
188188 return ;
189189 std::list<BadInlineSuppression> err;
190- ::inlineSuppressions (tokens, mSettings , &err);
190+ ::addinlineSuppressions (tokens, mSettings , &err);
191191 for (std::map<std::string,simplecpp::TokenList*>::const_iterator it = mTokenLists .begin (); it != mTokenLists .end (); ++it) {
192192 if (it->second )
193- ::inlineSuppressions (*it->second, mSettings , &err);
193+ ::addinlineSuppressions (*it->second, mSettings , &err);
194194 }
195195 for (const BadInlineSuppression &bad : err) {
196196 error (bad.location .file (), bad.location .line , bad.errmsg );
@@ -292,13 +292,13 @@ static std::string readcondition(const simplecpp::Token *iftok, const std::set<s
292292 if (sameline (iftok,dtok) && dtok->name && defined .find (dtok->str ()) == defined .end () && undefined.find (dtok->str ()) == undefined.end ())
293293 configset.insert (dtok->str ());
294294 }
295- std::string cfg ;
295+ std::string cfgStr ;
296296 for (const std::string &s : configset) {
297- if (!cfg .empty ())
298- cfg += ' ;' ;
299- cfg += s;
297+ if (!cfgStr .empty ())
298+ cfgStr += ' ;' ;
299+ cfgStr += s;
300300 }
301- return cfg ;
301+ return cfgStr ;
302302}
303303
304304static bool hasDefine (const std::string &userDefines, const std::string &cfg)
@@ -324,16 +324,16 @@ static std::string cfg(const std::vector<std::string> &configs, const std::strin
324324{
325325 std::set<std::string> configs2 (configs.begin (), configs.end ());
326326 std::string ret;
327- for (const std::string &cfg : configs2) {
328- if (cfg .empty ())
327+ for (const std::string &c : configs2) {
328+ if (c .empty ())
329329 continue ;
330- if (cfg == " 0" )
330+ if (c == " 0" )
331331 return " " ;
332- if (hasDefine (userDefines, cfg ))
332+ if (hasDefine (userDefines, c ))
333333 continue ;
334334 if (!ret.empty ())
335335 ret += ' ;' ;
336- ret += cfg ;
336+ ret += c ;
337337 }
338338 return ret;
339339}
@@ -552,9 +552,9 @@ void Preprocessor::preprocess(std::istream &istr, std::map<std::string, std::str
552552
553553 const std::set<std::string> configs = getConfigs (tokens1);
554554
555- for (const std::string &cfg : configs) {
556- if (mSettings .userUndefs .find (cfg ) == mSettings .userUndefs .end ()) {
557- result[cfg ] = getcode (tokens1, cfg , files, false );
555+ for (const std::string &c : configs) {
556+ if (mSettings .userUndefs .find (c ) == mSettings .userUndefs .end ()) {
557+ result[c ] = getcode (tokens1, c , files, false );
558558 }
559559 }
560560}
0 commit comments