From 7885ebe9620edd82f119eb290267c8e7eda014ed Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 30 Aug 2018 13:41:06 +0300 Subject: [PATCH] Use const references in BuildInfo::Tracked operators --- source/buildinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/buildinfo.h b/source/buildinfo.h index 1bba819..5528748 100644 --- a/source/buildinfo.h +++ b/source/buildinfo.h @@ -66,8 +66,8 @@ public: Tracked(T v): value(v), set(false) { } Tracked &operator=(const Tracked &v) { if(v.set) { value = v.value; set = true; } return *this; } - Tracked &operator=(T v) { value = v; set = true; return *this; } - operator T() const { return value; } + Tracked &operator=(const T &v) { value = v; set = true; return *this; } + operator const T &() const { return value; } }; typedef std::map DefineMap; -- 2.43.0