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 8974498 commit 3f01a4c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions include/simulation/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,26 @@ struct DefaultConf
}
switch (line_count) {
case 0:
DefaultConf<T>::WIN_WIDTH = std::atof(line.c_str());
DefaultConf<T>::WIN_WIDTH = std::atoi(line.c_str());
break;
case 1:
DefaultConf<T>::WIN_HEIGHT = std::atof(line.c_str());
DefaultConf<T>::WIN_HEIGHT = std::atoi(line.c_str());
break;
case 2:
DefaultConf<T>::USE_FULLSCREEN = std::atof(line.c_str());
DefaultConf<T>::USE_FULLSCREEN = std::atoi(line.c_str());
break;
case 3:
DefaultConf<T>::ANTS_COUNT = std::atof(line.c_str());
DefaultConf<T>::ANTS_COUNT = std::atoi(line.c_str());
break;
default:
return;
break;
}
++line_count;
}
return true;
} else {
return false;
}
return false;
return true;
}
};

Expand Down

0 comments on commit 3f01a4c

Please sign in to comment.