From 628cbe8e9094621abecbf1c360467b7d0fa905d8 Mon Sep 17 00:00:00 2001 From: "Zezheng.Li" Date: Mon, 9 Sep 2024 18:02:26 +0800 Subject: [PATCH] fix msvc --- include/ylt/metric/summary_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ylt/metric/summary_impl.hpp b/include/ylt/metric/summary_impl.hpp index 04583ed0f..036258d34 100644 --- a/include/ylt/metric/summary_impl.hpp +++ b/include/ylt/metric/summary_impl.hpp @@ -218,7 +218,7 @@ class summary_impl { --arr[pos]; int upper = (pos < bucket_size / 2) ? (bucket_size / 2) : (bucket_size); int lower = (pos < bucket_size / 2) ? (0) : (bucket_size / 2); - for (int delta = 1, lim = std::max(upper - pos, pos - lower + 1); + for (int delta = 1, lim = (std::max)(upper - pos, pos - lower + 1); delta < lim; ++delta) { if (pos + delta < upper) { if (++arr[pos + delta] <= near_uint32_max) {