From fa71769f3568b399aa9b91a1b3c9cfba3357e977 Mon Sep 17 00:00:00 2001 From: Adam Emerson Date: Tue, 3 Dec 2024 11:56:13 -0500 Subject: [PATCH] common/not_before_queue: Fix signed comparison warning Signed-off-by: Adam Emerson --- src/common/not_before_queue.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/common/not_before_queue.h b/src/common/not_before_queue.h index 65d674bb6f1e..c460d46c20a9 100644 --- a/src/common/not_before_queue.h +++ b/src/common/not_before_queue.h @@ -131,12 +131,20 @@ class not_before_queue_t { template bool operator()(const U &lhs, const container_t &rhs) const { - return lhs < project_removal_class(rhs.v); + if constexpr (std::is_integral_v) { + return std::cmp_less(lhs, project_removal_class(rhs.v)); + } else { + return lhs < project_removal_class(rhs.v); + } } template bool operator()(const container_t &lhs, const U &rhs) const { - return project_removal_class(lhs.v) < rhs; + if constexpr (std::is_integral_v) { + return std::cmp_less(project_removal_class(lhs.v), rhs); + } else { + return project_removal_class(lhs.v) < rhs; + } } }; struct removal_registry_disposer_t { -- 2.47.3