diff options
Diffstat (limited to 'sim/builder.cc')
-rw-r--r-- | sim/builder.cc | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/sim/builder.cc b/sim/builder.cc index 53e5cf3d8..890451ec4 100644 --- a/sim/builder.cc +++ b/sim/builder.cc @@ -39,26 +39,6 @@ using namespace std; - -ostream & -builderStream() -{ - static ofstream file; - static ostream *stream = NULL; - - if (!stream) { - if (!outputDirectory.empty()) { - string filename = outputDirectory + "builder.txt"; - file.open(filename.c_str()); - stream = &file; - } else { - stream = outputStream; - } - } - - return *stream; -} - SimObjectBuilder::SimObjectBuilder(const string &_configClass, const string &_instanceName, ConfigNode *_configNode, @@ -187,10 +167,10 @@ SimObjectClass::createObject(IniFile &configDB, // echo object parameters to stats file (for documenting the // config used to generate the associated stats) - builderStream() << "[" << object->name() << "]" << endl; - builderStream() << "type=" << simObjClassName << endl; - objectBuilder->showParams(builderStream()); - builderStream() << endl; + *configStream << "[" << object->name() << "]" << endl; + *configStream << "type=" << simObjClassName << endl; + objectBuilder->showParams(*configStream); + *configStream << endl; // done with the SimObjectBuilder now delete objectBuilder; |