Moved % modifier handling from node to nodedumper. This makes nodes with % operators use the existing cache instead of recalculating the object

export-menu
Marius Kintel 2014-02-04 23:49:10 -05:00
parent 6a1d91dc76
commit 716d8a7ab3
7 changed files with 16 additions and 16 deletions

View File

@ -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;
}

View File

@ -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";
}