fix: fixed macOS build, H A C K

This commit is contained in:
Qv2ray-dev 2020-07-07 18:26:30 +08:00
parent 2eefe1545d
commit ed5b9e6011
No known key found for this signature in database
GPG Key ID: E7FAEFAFCD031D4B
2 changed files with 7 additions and 3 deletions

View File

@ -1 +1 @@
5723
5724

View File

@ -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)