Browse Source

Now also creating a std::set before inserting stuff...

tempestpy_adaptions
gereon 12 years ago
parent
commit
05cc90cece
  1. 3
      src/ir/Module.cpp
  2. 3
      src/ir/Program.cpp

3
src/ir/Module.cpp

@ -34,6 +34,9 @@ Module::Module(std::string moduleName, std::vector<storm::ir::BooleanVariable> b
for (unsigned int id = 0; id < this->commands.size(); id++) {
std::string action = this->commands[id].getActionName();
if (action != "") {
if (this->actionsToCommandIndexMap.count(action) == 0) {
this->actionsToCommandIndexMap[action] = std::shared_ptr<std::set<uint_fast64_t>>(new std::set<uint_fast64_t>());
}
this->actionsToCommandIndexMap[action]->insert(id);
this->actions.insert(action);
}

3
src/ir/Program.cpp

@ -24,6 +24,9 @@ Program::Program(ModelType modelType, std::map<std::string, std::shared_ptr<stor
// Build actionsToModuleIndexMap
for (unsigned int id = 0; id < this->modules.size(); id++) {
for (auto action : this->modules[id].getActions()) {
if (this->actionsToModuleIndexMap.count(action) == 0) {
this->actionsToModuleIndexMap[action] = std::shared_ptr<std::set<uint_fast64_t>>(new std::set<uint_fast64_t>());
}
this->actionsToModuleIndexMap[action]->insert(id);
this->actions.insert(action);
}

Loading…
Cancel
Save