diff --git a/makespec/BUILDVERSION b/makespec/BUILDVERSION index e88369da..e0ffa8a2 100644 --- a/makespec/BUILDVERSION +++ b/makespec/BUILDVERSION @@ -1 +1 @@ -5723 +5724 diff --git a/src/components/latency/LatencyTestThread.cpp b/src/components/latency/LatencyTestThread.cpp index e4e2bd18..efc48ea0 100644 --- a/src/components/latency/LatencyTestThread.cpp +++ b/src/components/latency/LatencyTestThread.cpp @@ -50,8 +50,12 @@ namespace Qv2ray::components::latency #undef max #endif resultData.avg += _latency; - resultData.best = std::min(resultData.best, _latency); - resultData.worst = std::max(resultData.worst, _latency); +#define _qvmin_(x, y) ((x) < (y) ? (x) : (y)) +#define _qvmax_(x, y) ((x) > (y) ? (x) : (y)) + resultData.best = _qvmin_(resultData.best, _latency); + resultData.worst = _qvmax_(resultData.worst, _latency); +#undef _qvmax_ +#undef _qvmin_ } } if (resultData.totalCount > 0 && resultData.failedCount != resultData.totalCount)