diff options
author | Sebastian Geerken <devnull@localhost> | 2016-01-01 20:14:46 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2016-01-01 20:14:46 +0100 |
commit | bcf31f50c46dac457fe7f0fdd1f88331e07c9e60 (patch) | |
tree | 9e12f920cf6be2032bfead5b69e1d717ef62e1d6 /dw/tools.cc | |
parent | dc6e85ba555ab76f0e13495955690875c8b1a8d4 (diff) |
Fix memory problem.
Diffstat (limited to 'dw/tools.cc')
-rw-r--r-- | dw/tools.cc | 10 |
1 files changed, 9 insertions, 1 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; |