]> git.tdb.fi Git - builder.git/commitdiff
Use const references in BuildInfo::Tracked operators
authorMikko Rasa <tdb@tdb.fi>
Thu, 30 Aug 2018 10:41:06 +0000 (13:41 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 30 Aug 2018 10:41:06 +0000 (13:41 +0300)
source/buildinfo.h

index 1bba8195bc536014270ba8eff7664d31e63e7069..5528748fc55c82bfde6b14d09e3ca9bc3313e3bc 100644 (file)
@@ -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=(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<std::string, std::string> DefineMap;