From 8db2c378e1d006afb792d829857e866541bf81a5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 20 Apr 2013 17:32:04 +0300 Subject: [PATCH] Avoid an extra copy by making Variant::Store's c'tor take a const ref --- source/core/variant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.43.0