From d9ef5c5a857661d92f65b45becf30107c0b268e0 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Sun, 1 Oct 2017 14:24:37 +0200 Subject: [PATCH] Improved const correctness of local variables. --- lib/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils.h b/lib/utils.h index 0daa6d7c5..d57f2fbee 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -84,8 +84,8 @@ inline static int caseInsensitiveStringCompare(const std::string &lhs, const std if (lhs.size() != rhs.size()) return (lhs.size() < rhs.size()) ? -1 : 1; for (unsigned int i = 0; i < lhs.size(); ++i) { - int c1 = std::toupper(lhs[i]); - int c2 = std::toupper(rhs[i]); + const int c1 = std::toupper(lhs[i]); + const int c2 = std::toupper(rhs[i]); if (c1 != c2) return (c1 < c2) ? -1 : 1; }