From db0a56e4f5198a5ecda798b183cb002c62964fd3 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 18 Jun 2014 23:50:24 -0400 Subject: [PATCH] Variant - Improved copy ctor. --- src/Variant.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Variant.cpp b/src/Variant.cpp index 7f3f7102e..ff9d3dc81 100644 --- a/src/Variant.cpp +++ b/src/Variant.cpp @@ -25,6 +25,7 @@ //////////////////////////////////////////////////////////////////////////////// #include +#include // TODO Remove. #include #include #include @@ -54,16 +55,15 @@ Variant::Variant () //////////////////////////////////////////////////////////////////////////////// Variant::Variant (const Variant& other) -: _type (type_unknown) -, _bool (false) -, _integer (0) -, _real (0.0) -, _string ("") -, _date (0) -, _duration (0) -, _source ("") +: _type (other._type) +, _bool (other._bool) +, _integer (other._integer) +, _real (other._real) +, _string (other._string) +, _date (other._date) +, _duration (other._duration) +, _source (other._source) { - *this = other; } ////////////////////////////////////////////////////////////////////////////////