From b5d31b7780a4a895db77447f944a9938bdb9ede6 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Mon, 6 Oct 2025 22:27:36 +0200 Subject: [PATCH] libexpr: CompareValues can take const references Change-Id: I5ab1e9f71c2f066eb9bb39683ff00c5190c1fcd7 Signed-off-by: Raito Bezarius --- lix/libexpr/primops.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lix/libexpr/primops.cc b/lix/libexpr/primops.cc index b320987e0..91612bb4e 100644 --- a/lix/libexpr/primops.cc +++ b/lix/libexpr/primops.cc @@ -454,7 +454,12 @@ struct CompareValues : NeverAsync return (*this)(v1, v2, errorCtx); } - bool operator()(Value & v1, Value & v2, std::string_view errorCtx) const + bool operator()(Value const & v1, Value const & v2) const + { + return (*this)(v1, v2, errorCtx); + } + + bool operator()(Value const & v1, Value const & v2, std::string_view errorCtx) const { try { if (v1.type() == nFloat && v2.type() == nInt) {