Replace min, max, clamp functions with std counterparts

This commit is contained in:
Chocobo1
2021-12-27 20:31:57 +08:00
parent 3ea4c66d41
commit 63043b4927
7 changed files with 36 additions and 28 deletions

View File

@@ -28,6 +28,7 @@
#include "downloadedpiecesbar.h"
#include <algorithm>
#include <cmath>
#include <QDebug>
@@ -117,7 +118,7 @@ QVector<float> DownloadedPiecesBar::bitfieldToFloatVector(const QBitArray &vecin
value /= ratio;
// float precision sometimes gives > 1, because it's not possible to store irrational numbers
value = qMin(value, 1.0f);
value = std::min(value, 1.0f);
result[x] = value;
}