diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-09-26 07:30:18 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-09-26 07:30:18 +0000 |
commit | 89636834a6d0c86a9f835db48768601cec047214 (patch) | |
tree | b5d1c6caa30e03a81aaf98ae60ec6c6a5fb5c7cb | |
parent | e99509abde688315ac7a82d764b352e2e3312e61 (diff) | |
download | libbu++-89636834a6d0c86a9f835db48768601cec047214.tar.gz libbu++-89636834a6d0c86a9f835db48768601cec047214.tar.bz2 libbu++-89636834a6d0c86a9f835db48768601cec047214.tar.xz libbu++-89636834a6d0c86a9f835db48768601cec047214.zip |
Minor tweaks and fixes to Bu::Variant
Diffstat (limited to '')
-rw-r--r-- | src/variant.cpp | 9 | ||||
-rw-r--r-- | src/variant.h | 3 |
2 files changed, 11 insertions, 1 deletions
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() : | |||
18 | { | 18 | { |
19 | } | 19 | } |
20 | 20 | ||
21 | Bu::Variant::Variant( const Variant &v ) : | ||
22 | pCore( NULL ) | ||
23 | { | ||
24 | if( v.pCore ) | ||
25 | { | ||
26 | pCore = v.pCore->clone(); | ||
27 | } | ||
28 | } | ||
29 | |||
21 | Bu::Variant::~Variant() | 30 | Bu::Variant::~Variant() |
22 | { | 31 | { |
23 | } | 32 | } |
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 | |||
52 | return data; | 52 | return data; |
53 | } | 53 | } |
54 | 54 | ||
55 | t &getData() const | 55 | const t &getData() const |
56 | { | 56 | { |
57 | return data; | 57 | return data; |
58 | } | 58 | } |
@@ -90,6 +90,7 @@ namespace Bu | |||
90 | { | 90 | { |
91 | public: | 91 | public: |
92 | Variant(); | 92 | Variant(); |
93 | Variant( const Variant &v ); | ||
93 | virtual ~Variant(); | 94 | virtual ~Variant(); |
94 | 95 | ||
95 | bool isSet(); | 96 | bool isSet(); |