diff options
-rw-r--r-- | dw/tools.cc | 10 | ||||
-rw-r--r-- | dw/tools.hh | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/dw/tools.cc b/dw/tools.cc index 60e5e029..cb45ef15 100644 --- a/dw/tools.cc +++ b/dw/tools.cc @@ -20,7 +20,7 @@ SizeParams::SizeParams (int numPos, Widget **references, int *x, int *y) debugPrint (); } -SizeParams::SizeParams (SizeParams &other) +SizeParams::SizeParams (const SizeParams &other) { DBG_OBJ_CREATE ("dw::core::SizeParams"); init (); @@ -34,6 +34,14 @@ SizeParams::~SizeParams () DBG_OBJ_DELETE (); } +SizeParams &SizeParams::operator=(const SizeParams &other) +{ + cleanup (); + init (); + fill (other.numPos, other.references, other.x, other.y); + debugPrint (); +} + void SizeParams::init () { numPos = 0; diff --git a/dw/tools.hh b/dw/tools.hh index 60435c5a..2f8ff0b5 100644 --- a/dw/tools.hh +++ b/dw/tools.hh @@ -39,9 +39,11 @@ private: public: SizeParams (); SizeParams (int numPos, Widget **references, int *x, int *y); - SizeParams (SizeParams &other); + SizeParams (const SizeParams &other); ~SizeParams (); + SizeParams &operator=(const SizeParams &other); + void fill (int numPos, Widget **references, int *x, int *y); void forChild (Widget *parent, Widget *child, int xRel, int yRel, SizeParams *childParams); |