From 381fe48a69a9a31c59e5e433ed7dfb192b1da43b Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Tue, 20 Aug 2024 21:53:52 +0200 Subject: [PATCH] Use consistent arguments for std::max --- vespalib/src/vespa/vespalib/util/process_memory_stats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vespalib/src/vespa/vespalib/util/process_memory_stats.cpp b/vespalib/src/vespa/vespalib/util/process_memory_stats.cpp index 8981802bfbc1..5ca1fc60ccfb 100644 --- a/vespalib/src/vespa/vespalib/util/process_memory_stats.cpp +++ b/vespalib/src/vespa/vespalib/util/process_memory_stats.cpp @@ -155,7 +155,7 @@ namespace { bool similar(uint64_t lhs, uint64_t rhs, double epsilon) { - uint64_t maxDiff = std::max(1_Mi, uint64_t(epsilon * (lhs+rhs)/2.0)); + uint64_t maxDiff = std::max(uint64_t(1_Mi), uint64_t(epsilon * (lhs+rhs)/2.0)); return (lhs < rhs) ? ((rhs - lhs) <= maxDiff) : ((lhs - rhs) <= maxDiff); }