Gui: Use std::numeric_limits and std::numbers instead of defines

This commit is contained in:
Benjamin Nauck
2025-03-27 18:59:58 +01:00
parent 3253f2c2de
commit b625e81a3e
33 changed files with 204 additions and 168 deletions

View File

@@ -748,7 +748,7 @@ QString CallTipsList::stripWhiteSpace(const QString& str) const
{
QString stripped = str;
QStringList lines = str.split(QLatin1String("\n"));
int minspace=INT_MAX;
int minspace=std::numeric_limits<int>::max();
int line=0;
for (QStringList::iterator it = lines.begin(); it != lines.end(); ++it, ++line) {
if (it->size() > 0 && line > 0) {
@@ -766,7 +766,7 @@ QString CallTipsList::stripWhiteSpace(const QString& str) const
}
// remove all leading tabs from each line
if (minspace > 0 && minspace < INT_MAX) {
if (minspace > 0 && minspace < std::numeric_limits<int>::max()) {
int line=0;
QStringList strippedlines;
for (QStringList::iterator it = lines.begin(); it != lines.end(); ++it, ++line) {