summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2014-02-05 04:49:10 (GMT)
committerMarius Kintel <marius@kintel.net>2014-02-06 05:50:00 (GMT)
commit716d8a7ab3b93404bfcc5f2687d412272e6b7cfd (patch)
treeaff3c4896a9cb56c1ba70576f419a2d7f22618ca /src
parent6a1d91dc76ec819e85b180b8cdaf40ddd639a538 (diff)
Moved % modifier handling from node to nodedumper. This makes nodes with % operators use the existing cache instead of recalculating the object
Diffstat (limited to 'src')
-rw-r--r--src/node.cc2
-rw-r--r--src/nodedumper.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/node.cc b/src/node.cc
index a7a7630..f9c68d5 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -97,8 +97,6 @@ void AbstractNode::progress_report() const
std::ostream &operator<<(std::ostream &stream, const AbstractNode &node)
{
- // FIXME: Don't use deep access to modinst members
- if (node.modinst->isBackground()) stream << "%";
stream << node.toString();
return stream;
}
diff --git a/src/nodedumper.cc b/src/nodedumper.cc
index 4523bac..d2905c0 100644
--- a/src/nodedumper.cc
+++ b/src/nodedumper.cc
@@ -1,5 +1,6 @@
#include "nodedumper.h"
#include "state.h"
+#include "module.h"
#include <string>
#include <sstream>
@@ -47,6 +48,7 @@ std::string NodeDumper::dumpChildren(const AbstractNode &node)
iter != this->visitedchildren[node.index()].end();
iter++) {
assert(isCached(**iter));
+ if ((*iter)->modinst->isBackground()) dump << "%";
dump << this->cache[**iter] << "\n";
}
contact: Jan Huwald // Impressum