Skip to content

Commit 3f01a4c

Browse files
committed
Update config.hpp
1 parent 8974498 commit 3f01a4c

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

include/simulation/config.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,26 @@ struct DefaultConf
5454
}
5555
switch (line_count) {
5656
case 0:
57-
DefaultConf<T>::WIN_WIDTH = std::atof(line.c_str());
57+
DefaultConf<T>::WIN_WIDTH = std::atoi(line.c_str());
5858
break;
5959
case 1:
60-
DefaultConf<T>::WIN_HEIGHT = std::atof(line.c_str());
60+
DefaultConf<T>::WIN_HEIGHT = std::atoi(line.c_str());
6161
break;
6262
case 2:
63-
DefaultConf<T>::USE_FULLSCREEN = std::atof(line.c_str());
63+
DefaultConf<T>::USE_FULLSCREEN = std::atoi(line.c_str());
6464
break;
6565
case 3:
66-
DefaultConf<T>::ANTS_COUNT = std::atof(line.c_str());
66+
DefaultConf<T>::ANTS_COUNT = std::atoi(line.c_str());
6767
break;
6868
default:
69-
return;
69+
break;
7070
}
7171
++line_count;
7272
}
73-
return true;
73+
} else {
74+
return false;
7475
}
75-
return false;
76+
return true;
7677
}
7778
};
7879

0 commit comments

Comments
 (0)