Fixed a regression where StringUtil::toCapitalized() stopped working

This commit is contained in:
Leon Styhre 2023-08-21 17:01:43 +02:00
parent 5ddad6d55e
commit e3e319f2af

View file

@ -551,8 +551,8 @@ namespace Utils
std::string line {stringArg}; std::string line {stringArg};
bool active {true}; bool active {true};
for (unsigned char chr : line) { for (auto& chr : line) {
if (std::isalnum(chr)) { if (std::isalnum(static_cast<unsigned char>(chr))) {
if (active) { if (active) {
chr = std::toupper(chr); chr = std::toupper(chr);
active = false; active = false;