From 4e839db24a3bbc9f1c610c43d6faaaa99824dcca Mon Sep 17 00:00:00 2001 From: thegeorg <thegeorg@yandex-team.ru> Date: Thu, 10 Feb 2022 16:45:08 +0300 Subject: Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 1 of 2. --- library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/cpp/monlib/encode/prometheus') diff --git a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp index 7e81357dbd..ac9ac706cc 100644 --- a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp +++ b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp @@ -49,8 +49,8 @@ namespace NMonitoring { template <typename T, typename U> bool TryStaticCast(U val, T& out) { static_assert(std::is_arithmetic_v<U>); - if constexpr (std::is_floating_point_v<T> || std::is_floating_point_v<U>) { - if (val > MaxFloor<T>() || val < -MaxFloor<T>()) { + if constexpr (std::is_floating_point_v<T> || std::is_floating_point_v<U>) { + if (val > MaxFloor<T>() || val < -MaxFloor<T>()) { return false; } -- cgit v1.2.3