base: Fix for stats node on gcc < 4.6.3
This patch adds an explicit function to get the underlying node as gcc 4.6.1 and 4.6.2 have issues otherwise.
This commit is contained in:
parent
b976496a34
commit
77f8f5d94c
2 changed files with 8 additions and 3 deletions
|
@ -379,7 +379,7 @@ Formula::Formula()
|
|||
|
||||
Formula::Formula(Temp r)
|
||||
{
|
||||
root = r;
|
||||
root = r.getNodePtr();
|
||||
setInit();
|
||||
assert(size());
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ const Formula &
|
|||
Formula::operator=(Temp r)
|
||||
{
|
||||
assert(!root && "Can't change formulas");
|
||||
root = r;
|
||||
root = r.getNodePtr();
|
||||
setInit();
|
||||
assert(size());
|
||||
return *this;
|
||||
|
@ -400,7 +400,7 @@ Formula::operator+=(Temp r)
|
|||
if (root)
|
||||
root = NodePtr(new BinaryNode<std::plus<Result> >(root, r));
|
||||
else {
|
||||
root = r;
|
||||
root = r.getNodePtr();
|
||||
setInit();
|
||||
}
|
||||
|
||||
|
|
|
@ -2999,6 +2999,11 @@ class Temp
|
|||
*/
|
||||
operator NodePtr&() { return node; }
|
||||
|
||||
/**
|
||||
* Makde gcc < 4.6.3 happy and explicitly get the underlying node.
|
||||
*/
|
||||
NodePtr getNodePtr() const { return node; }
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new ScalarStatNode.
|
||||
|
|
Loading…
Reference in a new issue