]> git.tdb.fi Git - libs/core.git/commitdiff
Avoid an extra copy by making Variant::Store's c'tor take a const ref
authorMikko Rasa <tdb@tdb.fi>
Sat, 20 Apr 2013 14:32:04 +0000 (17:32 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 20 Apr 2013 14:32:04 +0000 (17:32 +0300)
source/core/variant.h

index 4a0c89cf1a9a4b22661d28e62ba192a06004aabd..515350de6ae5543158e20b6e2c20d4ef786163fb 100644 (file)
@@ -31,7 +31,7 @@ private:
        {
                T data;
 
-               Store(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<T>(data); }