diff options
author | David <david@xagasoft.com> | 2007-07-10 00:19:19 +0000 |
---|---|---|
committer | David <david@xagasoft.com> | 2007-07-10 00:19:19 +0000 |
commit | 2de3693dd24463c5a02b9308ddfd674f58bac7c1 (patch) | |
tree | af9bd21a242d6372f85b602cae425659dc8e20d7 /src/atom.h | |
parent | e3287beb03915aea7f2133147cb7b1d766daf079 (diff) | |
download | libbu++-2de3693dd24463c5a02b9308ddfd674f58bac7c1.tar.gz libbu++-2de3693dd24463c5a02b9308ddfd674f58bac7c1.tar.bz2 libbu++-2de3693dd24463c5a02b9308ddfd674f58bac7c1.tar.xz libbu++-2de3693dd24463c5a02b9308ddfd674f58bac7c1.zip |
Fixed the atom, it wasn't copying from other atoms properly.
Diffstat (limited to 'src/atom.h')
-rw-r--r-- | src/atom.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -22,6 +22,18 @@ namespace Bu | |||
22 | { | 22 | { |
23 | } | 23 | } |
24 | 24 | ||
25 | Atom( const MyType &oth ) : | ||
26 | pData( NULL ) | ||
27 | { | ||
28 | set( *oth.pData ); | ||
29 | } | ||
30 | |||
31 | Atom( const t &oth ) : | ||
32 | pData( NULL ) | ||
33 | { | ||
34 | set( oth ); | ||
35 | } | ||
36 | |||
25 | virtual ~Atom() | 37 | virtual ~Atom() |
26 | { | 38 | { |
27 | clear(); | 39 | clear(); |
@@ -83,6 +95,13 @@ namespace Bu | |||
83 | 95 | ||
84 | return *this; | 96 | return *this; |
85 | } | 97 | } |
98 | |||
99 | MyType &operator =( const MyType &oth ) | ||
100 | { | ||
101 | set( *oth.pData ); | ||
102 | |||
103 | return *this; | ||
104 | } | ||
86 | 105 | ||
87 | t *operator ->() | 106 | t *operator ->() |
88 | { | 107 | { |