changed fmax to std::max

This commit is contained in:
Brad Hefta-Gaub 2014-01-10 20:38:13 -08:00
parent b0f8e21d06
commit 124250b2c2

View file

@ -8,6 +8,7 @@
// Threaded or non-threaded packet sender. // Threaded or non-threaded packet sender.
// //
#include <algorithm>
#include <math.h> #include <math.h>
#include <stdint.h> #include <stdint.h>
@ -219,7 +220,7 @@ bool PacketSender::nonThreadedProcess() {
// we will reset our check PPS and time each second (callsPerSecond) or at least 5 calls (if we get called less frequently // we will reset our check PPS and time each second (callsPerSecond) or at least 5 calls (if we get called less frequently
// than 5 times per second) This gives us sufficient smoothing in our packet adjustments // than 5 times per second) This gives us sufficient smoothing in our packet adjustments
float callIntervalsPerReset = fmax(callsPerSecond, MIN_CALL_INTERVALS_PER_RESET); float callIntervalsPerReset = std::max(callsPerSecond, MIN_CALL_INTERVALS_PER_RESET);
if (elapsedSinceLastCheck > (averageCallTime * CALL_INTERVALS_TO_CHECK)) { if (elapsedSinceLastCheck > (averageCallTime * CALL_INTERVALS_TO_CHECK)) {
float ppsOverCheckInterval = (float)_packetsOverCheckInterval; float ppsOverCheckInterval = (float)_packetsOverCheckInterval;