-
- Downloads
Remove all instances of the “map.find(key)->second” pattern
This is unsafe since the find() method can return a past-the-end iterator, which should be tested for. Replace most instances by calls to the std::map::at() method (which throws if the key is unknown), and which is incidentally more readable.
Showing
- src/ConfigFile.cc 1 addition, 1 deletionsrc/ConfigFile.cc
- src/DynamicModel.cc 1 addition, 1 deletionsrc/DynamicModel.cc
- src/DynamicModel.hh 8 additions, 8 deletionssrc/DynamicModel.hh
- src/ExternalFunctionsTable.hh 9 additions, 6 deletionssrc/ExternalFunctionsTable.hh
- src/ModelTree.cc 2 additions, 2 deletionssrc/ModelTree.cc
- src/ModelTree.hh 6 additions, 6 deletionssrc/ModelTree.hh
- src/StaticModel.cc 1 addition, 1 deletionsrc/StaticModel.cc
- src/StaticModel.hh 6 additions, 6 deletionssrc/StaticModel.hh
- src/SubModel.cc 18 additions, 18 deletionssrc/SubModel.cc
- src/macro/Environment.cc 1 addition, 1 deletionsrc/macro/Environment.cc
Loading
Please register or sign in to comment