projects
/
libs
/
core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43a7280
)
Avoid an extra copy by making Variant::Store's c'tor take a const ref
author
Mikko Rasa
<tdb@tdb.fi>
Sat, 20 Apr 2013 14:32:04 +0000
(17:32 +0300)
committer
Mikko Rasa
<tdb@tdb.fi>
Sat, 20 Apr 2013 14:32:04 +0000
(17:32 +0300)
source/core/variant.h
patch
|
blob
|
history
diff --git
a/source/core/variant.h
b/source/core/variant.h
index 4a0c89cf1a9a4b22661d28e62ba192a06004aabd..515350de6ae5543158e20b6e2c20d4ef786163fb 100644
(file)
--- 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<T>(data); }