From: Mikko Rasa Date: Sat, 20 Apr 2013 14:32:04 +0000 (+0300) Subject: Avoid an extra copy by making Variant::Store's c'tor take a const ref X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=8db2c378e1d006afb792d829857e866541bf81a5 Avoid an extra copy by making Variant::Store's c'tor take a const ref --- diff --git a/source/core/variant.h b/source/core/variant.h index 4a0c89c..515350d 100644 --- a/source/core/variant.h +++ b/source/core/variant.h @@ -31,7 +31,7 @@ private: { T data; - Store(T d): data(d) { } + Store(const T &d): data(d) { } virtual const std::type_info &type_id() const { return typeid(T); } virtual StoreBase *clone() const { return new Store(data); }