Skip to content

Commit

Permalink
Update config.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
johnBuffer committed Aug 10, 2021
1 parent 3f01a4c commit 2d89574
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/simulation/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,19 @@ struct DefaultConf
if (line[0] == '#') {
continue;
}
const char* line_c = line.c_str();
switch (line_count) {
case 0:
DefaultConf<T>::WIN_WIDTH = std::atoi(line.c_str());
DefaultConf<T>::WIN_WIDTH = std::atoi(line_c);
break;
case 1:
DefaultConf<T>::WIN_HEIGHT = std::atoi(line.c_str());
DefaultConf<T>::WIN_HEIGHT = std::atoi(line_c);
break;
case 2:
DefaultConf<T>::USE_FULLSCREEN = std::atoi(line.c_str());
DefaultConf<T>::USE_FULLSCREEN = std::atoi(line_c);
break;
case 3:
DefaultConf<T>::ANTS_COUNT = std::atoi(line.c_str());
DefaultConf<T>::ANTS_COUNT = std::atoi(line_c);
break;
default:
break;
Expand Down

0 comments on commit 2d89574

Please sign in to comment.