Explicit std::min/max template usage

This is unfortunately required in several cases:
 - Sometimes when we use either float and double (this should be changed)
 - Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
 - Because we mix pointer differences and ints
This commit is contained in:
Romain Goyet
2020-04-12 19:36:32 -04:00
committed by Ecco
parent c71dcca691
commit 84768472bd
33 changed files with 64 additions and 65 deletions

View File

@@ -52,7 +52,7 @@ float GraphController::interestingXHalfRange() const {
Sequence * s = functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(i));
int firstInterestingIndex = s->initialRank();
nmin = std::min(nmin, firstInterestingIndex);
nmax = std::max(nmax, firstInterestingIndex + standardRange);
nmax = std::max(nmax, firstInterestingIndex + static_cast<int>(standardRange));
}
assert(nmax - nmin >= standardRange);
return nmax - nmin;