Type.replace(Pos, Kw.size(), "");
}
}
- TypeName = Type.erase(0, Type.find_first_not_of(" "));
+ TypeName = Type.erase(0, Type.find_first_not_of(' '));
// Remove template parameters
- const size_t Pos = Type.find("<");
+ const size_t Pos = Type.find('<');
if (Pos != std::string::npos) {
TypeName = Type.erase(Pos, Type.size() - Pos);
}
}
}
- TypeName = Type.erase(0, Type.find_first_not_of(" "));
+ TypeName = Type.erase(0, Type.find_first_not_of(' '));
if (!RedundantRemoved) {
- std::size_t FoundSpace = Type.find(" ");
+ std::size_t FoundSpace = Type.find(' ');
if (FoundSpace != std::string::npos)
Type = Type.substr(0, FoundSpace);
}
- TypeName = Type.erase(0, Type.find_first_not_of(" "));
+ TypeName = Type.erase(0, Type.find_first_not_of(' '));
QualType QT = VD->getType();
if (!QT.isNull() && QT->isArrayType())
if (PrefixStr.empty())
PrefixStr = HNOption.DerivedType.lookup("Array");
} else if (QT->isReferenceType()) {
- size_t Pos = ModifiedTypeName.find_last_of("&");
+ size_t Pos = ModifiedTypeName.find_last_of('&');
if (Pos != std::string::npos)
ModifiedTypeName = ModifiedTypeName.substr(0, Pos);
}
std::string Name = ED->getName().str();
if (std::string::npos != Name.find("enum")) {
Name = Name.substr(strlen("enum"), Name.length() - strlen("enum"));
- Name = Name.erase(0, Name.find_first_not_of(" "));
+ Name = Name.erase(0, Name.find_first_not_of(' '));
}
static llvm::Regex Splitter(
// Ignore trailing spaces (12.5.6.2 p1) and convert to upper case
static std::string Normalize(const std::string &value) {
auto upper{parser::ToUpperCaseLetters(value)};
- std::size_t lastNonBlank{upper.find_last_not_of(" ")};
+ std::size_t lastNonBlank{upper.find_last_not_of(' ')};
upper.resize(lastNonBlank == std::string::npos ? 0 : lastNonBlank + 1);
return upper;
}