From 89636834a6d0c86a9f835db48768601cec047214 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 26 Sep 2009 07:30:18 +0000 Subject: Minor tweaks and fixes to Bu::Variant --- src/variant.cpp | 9 +++++++++ src/variant.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/variant.cpp b/src/variant.cpp index 95eea88..62e74bc 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -18,6 +18,15 @@ Bu::Variant::Variant() : { } +Bu::Variant::Variant( const Variant &v ) : + pCore( NULL ) +{ + if( v.pCore ) + { + pCore = v.pCore->clone(); + } +} + Bu::Variant::~Variant() { } diff --git a/src/variant.h b/src/variant.h index 889df88..805ad1d 100644 --- a/src/variant.h +++ b/src/variant.h @@ -52,7 +52,7 @@ namespace Bu return data; } - t &getData() const + const t &getData() const { return data; } @@ -90,6 +90,7 @@ namespace Bu { public: Variant(); + Variant( const Variant &v ); virtual ~Variant(); bool isSet(); -- cgit v1.2.3