diff --git a/include/simulation/config.hpp b/include/simulation/config.hpp index 80683c8f..76328321 100644 --- a/include/simulation/config.hpp +++ b/include/simulation/config.hpp @@ -54,25 +54,26 @@ struct DefaultConf } switch (line_count) { case 0: - DefaultConf::WIN_WIDTH = std::atof(line.c_str()); + DefaultConf::WIN_WIDTH = std::atoi(line.c_str()); break; case 1: - DefaultConf::WIN_HEIGHT = std::atof(line.c_str()); + DefaultConf::WIN_HEIGHT = std::atoi(line.c_str()); break; case 2: - DefaultConf::USE_FULLSCREEN = std::atof(line.c_str()); + DefaultConf::USE_FULLSCREEN = std::atoi(line.c_str()); break; case 3: - DefaultConf::ANTS_COUNT = std::atof(line.c_str()); + DefaultConf::ANTS_COUNT = std::atoi(line.c_str()); break; default: - return; + break; } ++line_count; } - return true; + } else { + return false; } - return false; + return true; } };