diff options
Diffstat (limited to 'src/base/statistics.cc')
-rw-r--r-- | src/base/statistics.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/base/statistics.cc b/src/base/statistics.cc index 59013ed34..ab351567c 100644 --- a/src/base/statistics.cc +++ b/src/base/statistics.cc @@ -238,12 +238,12 @@ Vector2dInfo::enable() Formula::Formula() { - setInit(); } Formula::Formula(Temp r) { root = r; + setInit(); assert(size()); } @@ -252,6 +252,7 @@ Formula::operator=(Temp r) { assert(!root && "Can't change formulas"); root = r; + setInit(); assert(size()); return *this; } @@ -261,8 +262,11 @@ Formula::operator+=(Temp r) { if (root) root = NodePtr(new BinaryNode<std::plus<Result> >(root, r)); - else + else { root = r; + setInit(); + } + assert(size()); return *this; } |