diff --git a/DRAMSys/library/src/simulation/TraceSetup.cpp b/DRAMSys/library/src/simulation/TraceSetup.cpp index b0fd3390..faaa37f8 100644 --- a/DRAMSys/library/src/simulation/TraceSetup.cpp +++ b/DRAMSys/library/src/simulation/TraceSetup.cpp @@ -37,7 +37,7 @@ traceSetup::traceSetup(std::string uri, std::string pathToResources, - std::vector * devices) + std::vector *devices) { // Load Simulation: tinyxml2::XMLDocument simulationdoc; @@ -71,13 +71,12 @@ traceSetup::traceSetup(std::string uri, std::string name = device->GetText(); int pos = name.rfind('.'); - if(pos == std::string::npos) - { + if (pos == std::string::npos) { throw std::runtime_error("Name of the trace file does not contain a valid extension."); } // Get the extension and make it lower case - std::string ext = name.substr(pos+1); + std::string ext = name.substr(pos + 1); std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower); std::string stlFile = pathToResources + string("traces/") + name; @@ -86,17 +85,12 @@ traceSetup::traceSetup(std::string uri, // replace all '.' to '_' std::replace( moduleName.begin(), moduleName.end(), '.', '_'); - TracePlayer * player; - if(strcmp(ext.c_str(), "stl") == 0) - { + TracePlayer *player; + if (strcmp(ext.c_str(), "stl") == 0) { player = new StlPlayer(moduleName.c_str(), stlFile, playerClk, this); - } - else if(strcmp(ext.c_str(), "rstl") == 0) - { + } else if (strcmp(ext.c_str(), "rstl") == 0) { player = new StlPlayer(moduleName.c_str(), stlFile, playerClk, this); - } - else - { + } else { std::string error = "Unsupported file extension in " + name; throw std::runtime_error(error); } diff --git a/DRAMSys/library/src/simulation/TraceSetup.h b/DRAMSys/library/src/simulation/TraceSetup.h index 2d0596c9..901b6756 100644 --- a/DRAMSys/library/src/simulation/TraceSetup.h +++ b/DRAMSys/library/src/simulation/TraceSetup.h @@ -49,7 +49,7 @@ class traceSetup : public TracePlayerListener public: traceSetup(std::string uri, std::string pathToResources, - std::vector * devices); + std::vector *devices); virtual void tracePlayerTerminates() override; virtual void transactionFinished() override; diff --git a/DRAMSys/simulator/main.cpp b/DRAMSys/simulator/main.cpp index 8c71aaeb..f6a6bda9 100644 --- a/DRAMSys/simulator/main.cpp +++ b/DRAMSys/simulator/main.cpp @@ -72,7 +72,7 @@ int sc_main(int argc, char **argv) SimulationXML = resources + "simulations/ddr3-example.xml"; } - std::vector players; + std::vector players; // Instantiate DRAMSys: DRAMSys *dramSys = new DRAMSys("DRAMSys", SimulationXML, resources);