From 3dfe9eff3efcee930d71cc32a525e648071ca977 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Fri, 3 Jun 2022 00:07:15 +0200 Subject: [PATCH] astutils.cpp: Improved const correctness --- lib/astutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 03ca05daf..3db38c1cf 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -1103,7 +1103,7 @@ static bool isSameLifetime(const Token * const tok1, const Token * const tok2) return v1.tokvalue == v2.tokvalue; } -static bool compareKnownValue(const Token * const tok1, const Token * const tok2, std::function compare) +static bool compareKnownValue(const Token * const tok1, const Token * const tok2, const std::function & compare) { static const auto isKnownFn = std::mem_fn(&ValueFlow::Value::isKnown);