1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2024-04-16 09:17:18 +02:00
parent 99f620f101
commit 031d82f689

View File

@ -41,6 +41,7 @@ static bool isAllUpperCase(const QString &str)
for (int i = 0; i < str.size(); i++) {
QChar c(str.at(i));
if (c.isLetter() && !(c.isUpper() || c == QChar(0x00DF)))
return false;
}
@ -59,12 +60,9 @@ static QString capitalized(const QString &str)
for (int i = 1; i < str.size(); i++) {
QChar last(str.at(i-1));
QChar current(str.at(i));
QChar c(str.at(i));
if (!(last.isSpace() || last == '('))
ret[i] = current.toLower();
else
ret[i] = current;
ret[i] = (last.isSpace() || last == '(') ? c : c.toLower();
}
return ret;