Skip to content
Snippets Groups Projects
Commit 3d682d89 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

ensure that add state follows naming conventions

parent 68548799
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@
#include "rollball.hpp"
static void setup_menu(fggl::App& app) {
auto *menu = app.add_state<fggl::scenes::BasicMenu>("menu");
auto *menu = app.addState<fggl::scenes::BasicMenu>("menu");
// add some menu items for the game states
menu->add("terrain", [&app]() {
......@@ -98,8 +98,8 @@ int main(int argc, const char* argv[]) {
// our test states
setup_menu(app);
app.add_state<GameScene>("game");
app.add_state<demo::RollBall>("rollball");
app.addState<GameScene>("game");
app.addState<demo::RollBall>("rollball");
return app.run(argc, argv);
}
......@@ -103,7 +103,7 @@ namespace fggl {
int run(int argc, const char **argv);
template<typename T>
T *add_state(const Identifer &name) {
T *addState(const Identifer &name) {
static_assert(std::is_base_of<AppState, T>::value, "States must be AppStates");
return m_states.put<T>(name, *this);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment