Skip to content

Commit

Permalink
use find_first_of
Browse files Browse the repository at this point in the history
  • Loading branch information
ludviggunne committed Oct 21, 2024
1 parent 02b93ef commit d5d1609
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,7 @@ void simplecpp::TokenList::combineOperators()
continue;
}
// float literals..
if (tok->previous && tok->previous->number && sameline(tok->previous, tok) && tok->previous->str().find('_', 0) == std::string::npos
&& tok->previous->str().find('.', 0) == std::string::npos) {
if (tok->previous && tok->previous->number && sameline(tok->previous, tok) && tok->previous->str().find_first_of("._") == std::string::npos) {
tok->setstr(tok->previous->str() + '.');
deleteToken(tok->previous);
if (sameline(tok, tok->next) && (isFloatSuffix(tok->next) || (tok->next && tok->next->startsWithOneOf("AaBbCcDdEeFfPp")))) {
Expand Down

0 comments on commit d5d1609

Please sign in to comment.