diff --git a/demo/demo/grid.cpp b/demo/demo/grid.cpp index 2897bb8be194afe2d20a70f1d52a0f92557f7b81..3af24697b7dbcb6bdb4232d38fe9a41dc6a85cdd 100644 --- a/demo/demo/grid.cpp +++ b/demo/demo/grid.cpp @@ -97,8 +97,8 @@ namespace demo { auto& manager = area->entities(); { player = manager.create(); - auto& cellPos = manager.add<CellPos>(player); - auto& robotState = manager.add<RobotState>(player); + manager.add<CellPos>(player); + manager.add<RobotState>(player); } return player; @@ -126,7 +126,7 @@ namespace demo { fggl::math::vec2i size{32, 32}; auto btn = std::make_unique<fggl::gui::Button>(pos, size); btn->label(action.name); - btn->addCallback([=](){ + btn->addCallback([=, this](){ this->m_program.m_instructions.push_back({action.name, action.callback}); }); btnGrid->add(std::move(btn)); diff --git a/demo/demo/models/viewer.cpp b/demo/demo/models/viewer.cpp index 5c1f15aa107e0326ba92a34f18f1712a645bff46..6f365f33cf2beaeda03209df31747d0649bb3471 100644 --- a/demo/demo/models/viewer.cpp +++ b/demo/demo/models/viewer.cpp @@ -46,7 +46,7 @@ namespace demo { mesh.pipeline = "redbook/debug"; } - auto& material = manager.add<fggl::gfx::PhongMaterial>(model); + manager.add<fggl::gfx::PhongMaterial>(model); return model; } @@ -93,7 +93,7 @@ namespace demo { static void setup_lighting(fggl::entity::EntityManager& ecs) { auto light = ecs.create(); - auto& transform = ecs.add<fggl::math::Transform>(light); + ecs.add<fggl::math::Transform>(light); auto& lightComp = ecs.add<fggl::gfx::DirectionalLight>(light); lightComp.position = fggl::math::vec3( 10.0F, 5.0F, 0.0F ); @@ -149,7 +149,7 @@ namespace demo { } } - void Viewer::cycleAsset(uint64_t idx) { + void Viewer::cycleAsset(uint64_t /*idx*/) { auto *loader = owner().service<fggl::assets::Loader>(); auto *manager = owner().service<fggl::assets::AssetManager>(); diff --git a/demo/demo/rollball.cpp b/demo/demo/rollball.cpp index 4242194b9dee0fcd0923a689e270ffb720fb633a..0b5200a5189c2d9ba59233f4f0c1b64d64d00ab0 100644 --- a/demo/demo/rollball.cpp +++ b/demo/demo/rollball.cpp @@ -48,7 +48,7 @@ static void setup_camera(fggl::entity::EntityManager& world) { world.add<fggl::gfx::Camera>(prototype); } -static fggl::entity::EntityID setup_environment(fggl::entity::EntityManager& world, fggl::entity::EntityFactory* factory, const fggl::math::vec2& size, demo::RollState& state) { +static fggl::entity::EntityID setup_environment(fggl::entity::EntityManager& world, fggl::entity::EntityFactory* /*factory*/, const fggl::math::vec2& /*size*/, demo::RollState& state) { // ensure the state is clean state.closestPickup = fggl::entity::INVALID; state.mode = demo::DebugMode::NORMAL; diff --git a/demo/demo/topdown.cpp b/demo/demo/topdown.cpp index 8069a3cdb796bfd2219e61a78f6e76fd9e347f79..7d7a197e5320626d75e9b3780f5edb07a24a998a 100644 --- a/demo/demo/topdown.cpp +++ b/demo/demo/topdown.cpp @@ -54,7 +54,7 @@ namespace demo { static void setup_lighting(fggl::entity::EntityManager& ecs) { auto light = ecs.create(); - auto& transform = ecs.add<fggl::math::Transform>(light); + ecs.add<fggl::math::Transform>(light); auto& lightComp = ecs.add<fggl::gfx::DirectionalLight>(light); lightComp.position = fggl::math::vec3( 10.0F, 5.0F, 0.0F ); diff --git a/fggl/audio/openal/audio.cpp b/fggl/audio/openal/audio.cpp index d118f01f01b2646f7aa43f3b48ed798bb304b8c3..8a14cdf6966b9c855f9c670558ab09fd86ed7c02 100644 --- a/fggl/audio/openal/audio.cpp +++ b/fggl/audio/openal/audio.cpp @@ -51,7 +51,7 @@ namespace fggl::audio::openal { return nullptr; } - auto load_vorbis_short(std::filesystem::path path, assets::MemoryBlock& block) -> bool { + auto load_vorbis_short(std::filesystem::path path, assets::MemoryBlock& /*block*/) -> bool { // vorbis auto* clip = new AudioClipShort(); clip->sampleCount = stb_vorbis_decode_filename( path.c_str(), &clip->channels, &clip->sampleRate, &clip->data); diff --git a/fggl/data/assimp/module.cpp b/fggl/data/assimp/module.cpp index 453edfbc91f0ecbc5705685bdf0d5ebccf85462a..64d10508b2b84dab9aaf2c76cb3029497abc58f4 100644 --- a/fggl/data/assimp/module.cpp +++ b/fggl/data/assimp/module.cpp @@ -17,7 +17,6 @@ // #include "fggl/data/assimp/module.hpp" -#include "fggl/data/model.hpp" #include "fggl/debug/logging.hpp" #include "fggl/assets/manager.hpp" #include "fggl/mesh/mesh.hpp" @@ -212,7 +211,7 @@ namespace fggl::data::models { return nullptr; } - auto load_assimp_texture(assets::Loader* loader, const assets::AssetID& guid, const assets::LoaderContext& data, void* userPtr) -> assets::AssetRefRaw { + auto load_assimp_texture(assets::Loader* /*loader*/, const assets::AssetID& guid, const assets::LoaderContext& data, void* userPtr) -> assets::AssetRefRaw { auto* manager = (assets::AssetManager*)userPtr; if ( manager->has(guid) ) { diff --git a/fggl/debug/imgui/include/imgui_impl_glfw.h b/fggl/debug/imgui/include/imgui_impl_glfw.h index 470148bd84289d6ded1074df1b946f97491e0a44..b85db2998a333b975a4269d21f7cb1bd32acfc6f 100644 --- a/fggl/debug/imgui/include/imgui_impl_glfw.h +++ b/fggl/debug/imgui/include/imgui_impl_glfw.h @@ -21,9 +21,9 @@ struct GLFWwindow; -IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForOpenGL(GLFWwindow *window, bool install_callbacks) -> bool; -IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForVulkan(GLFWwindow *window, bool install_callbacks) -> bool; -IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForOther(GLFWwindow *window, bool install_callbacks) -> bool; +IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForOpenGL(GLFWwindow *window, bool installCallbacks) -> bool; +IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForVulkan(GLFWwindow *window, bool installCallbacks) -> bool; +IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForOther(GLFWwindow *window, bool installCallbacks) -> bool; IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown(); IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame(); diff --git a/fggl/debug/imgui/include/imgui_impl_opengl3.h b/fggl/debug/imgui/include/imgui_impl_opengl3.h index 1ada73d3a9010f203c40c0041fdfda60887e109c..9879ded2ca578869200bee3e842849740a500c3b 100644 --- a/fggl/debug/imgui/include/imgui_impl_opengl3.h +++ b/fggl/debug/imgui/include/imgui_impl_opengl3.h @@ -25,7 +25,7 @@ #include "imgui.h" // IMGUI_IMPL_API // Backend API -IMGUI_IMPL_API auto ImGui_ImplOpenGL3_Init(const char *glsl_version = NULL) -> bool; +IMGUI_IMPL_API auto ImGui_ImplOpenGL3_Init(const char *glsl_version = nullptr) -> bool; IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown(); IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame(); IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData *draw_data); diff --git a/fggl/entity/loader/loader.cpp b/fggl/entity/loader/loader.cpp index f75f363ba8c859153e516693cad27c4d0f25734e..90e22b5e11185b08fa641e246e1b3bca1d87bbeb 100644 --- a/fggl/entity/loader/loader.cpp +++ b/fggl/entity/loader/loader.cpp @@ -22,7 +22,7 @@ namespace fggl::entity { - auto load_scene(assets::Loader* loader, const assets::AssetID& asset, const assets::LoaderContext& data, void* ptr) -> assets::AssetRefRaw { + auto load_scene(assets::Loader* /*loader*/, const assets::AssetID& /*asset*/, const assets::LoaderContext& data, void* ptr) -> assets::AssetRefRaw { auto* gamePtr = (scenes::Game*)ptr; auto filePath = data.assetPath; @@ -77,7 +77,7 @@ namespace fggl::entity { return nullptr; } - auto load_prototype(assets::Loader* loader, const assets::AssetID &guid, const assets::LoaderContext& data, EntityFactory* factory) -> assets::AssetRefRaw { + auto load_prototype(assets::Loader* /*loader*/, const assets::AssetID &/*guid*/, const assets::LoaderContext& data, EntityFactory* factory) -> assets::AssetRefRaw { auto filePath = data.assetPath; // We need to process the prototypes, and load them into the asset system. diff --git a/fggl/entity/module.cpp b/fggl/entity/module.cpp index 11688728c3893d4bad1c2b0b293697461e9c6e1b..d967b72298a62408cbfc61b1972bec4b02992ada 100644 --- a/fggl/entity/module.cpp +++ b/fggl/entity/module.cpp @@ -45,7 +45,7 @@ namespace fggl::entity { return assets::INVALID_ASSET_TYPE; } - auto get_scene_deps(const std::string& packName, std::filesystem::path packRoot, assets::ResourceRecord& rr) -> bool { + auto get_scene_deps(const std::string& /*packName*/, std::filesystem::path /*packRoot*/, assets::ResourceRecord& rr) -> bool { auto nodes = YAML::LoadAllFromFile( rr.m_path ); for ( auto& node : nodes ) { diff --git a/fggl/gfx/ogl/renderer.cpp b/fggl/gfx/ogl/renderer.cpp index ea6e7a2e8e387ccbda76a24cd3a16e47b347f096..600f1460e827683edf0ce20a1645fcedc9d8ac93 100644 --- a/fggl/gfx/ogl/renderer.cpp +++ b/fggl/gfx/ogl/renderer.cpp @@ -27,7 +27,6 @@ #include <glm/ext/matrix_clip_space.hpp> #include <glm/ext/matrix_transform.hpp> #include <glm/glm.hpp> -#include <glm/gtc/type_ptr.hpp> #include <memory> @@ -141,7 +140,7 @@ namespace fggl::gfx { cache->load(ShaderConfig::named("debug")); } - static void splat_checkerboard(GLuint* memory, int width = 128, int height = 128) { + static void splat_checkerboard(GLuint* memory, unsigned int width = 128, unsigned int height = 128) { int counter = 0; auto colour = ogl4::TEX_CHECKER; diff --git a/fggl/gfx/ogl4/canvas.cpp b/fggl/gfx/ogl4/canvas.cpp index 21b733f1a5b0c3f8fc587617101311c8a268e34a..a0a5828911b804930923fa41c4ed947ced05b90f 100644 --- a/fggl/gfx/ogl4/canvas.cpp +++ b/fggl/gfx/ogl4/canvas.cpp @@ -159,7 +159,7 @@ namespace fggl::gfx::ogl4 { return; } - // setup the shader + // set up the shader shader.use(); auto projMat = glm::ortho(0.0F, 1920.0F, 1080.0F, 0.F); shader.setUniformMtx(shader.uniform("projection"), projMat); @@ -167,7 +167,7 @@ namespace fggl::gfx::ogl4 { // bind the vbo we'll use for writing m_vao.bind(); - // setup the openGL state we expect for rendering + // set up the openGL state we expect for rendering glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); @@ -179,7 +179,7 @@ namespace fggl::gfx::ogl4 { const auto label = textCmd.text; math::vec2 penPos(textCmd.pos); - // setup a non-owning holder for the characters + // set up a non-owning holder for the characters data::Texture2D tex; tex.channels = 1; diff --git a/fggl/gfx/ogl4/module.cpp b/fggl/gfx/ogl4/module.cpp index 14974f18781b19577440b3e8806ab0e788ae0261..2a912e96e398a66ae949b8e9e8de2d4b7e894c14 100644 --- a/fggl/gfx/ogl4/module.cpp +++ b/fggl/gfx/ogl4/module.cpp @@ -31,29 +31,32 @@ namespace fggl::gfx { constexpr const char *SHAPE_SPHERE{"sphere"}; constexpr const char *SHAPE_BOX{"box"}; - static void process_shape(const YAML::Node &node, mesh::Mesh3D &mesh) { - auto transform = data::OFFSET_NONE; - - auto offset = node["offset"].as<math::vec3>(math::VEC3_ZERO); - transform = glm::translate(transform, offset); - - auto scale = node["scale"].as<math::vec3>(math::VEC3_ONES); - transform = glm::scale(transform, scale); - debug::debug("scale: {}, {}, {}", scale.x, scale.y, scale.z); - - // now the shape itself - auto type = node["type"].as<std::string>(); - if (type == SHAPE_BOX) { - data::make_cube(mesh, transform); - } else if (type == SHAPE_SPHERE) { - auto stacks = node["stacks"].as<uint32_t>(DEFAULT_STACKS); - auto slices = node["slices"].as<uint32_t>(DEFAULT_SLICES); - data::make_sphere(mesh, transform, stacks, slices); - } else { - debug::log(debug::Level::warning, "unknown shape type requested: {}", type); + namespace { + void process_shape(const YAML::Node &node, mesh::Mesh3D &mesh) { + auto transform = data::OFFSET_NONE; + + auto offset = node["offset"].as<math::vec3>(math::VEC3_ZERO); + transform = glm::translate(transform, offset); + + auto scale = node["scale"].as<math::vec3>(math::VEC3_ONES); + transform = glm::scale(transform, scale); + debug::debug("scale: {}, {}, {}", scale.x, scale.y, scale.z); + + // now the shape itself + auto type = node["type"].as<std::string>(); + if (type == SHAPE_BOX) { + data::make_cube(mesh, transform); + } else if (type == SHAPE_SPHERE) { + auto stacks = node["stacks"].as<uint32_t>(DEFAULT_STACKS); + auto slices = node["slices"].as<uint32_t>(DEFAULT_SLICES); + data::make_sphere(mesh, transform, stacks, slices); + } else { + debug::log(debug::Level::warning, "unknown shape type requested: {}", type); + } } } + void attach_mesh(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services &services) { // check for the asset service @@ -144,7 +147,7 @@ namespace fggl::gfx { void attach_material(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, - modules::Services& services ) { + modules::Services& /*services*/ ) { auto &mat = manager.add<gfx::PhongMaterial>(id); mat.ambient = spec.get<math::vec3>("ambient", gfx::DEFAULT_AMBIENT); mat.diffuse = spec.get<math::vec3>("diffuse", gfx::DEFAULT_DIFFUSE); @@ -152,7 +155,7 @@ namespace fggl::gfx { mat.shininess = spec.get<float>("ambient", gfx::DEFAULT_SHININESS); } - void attach_light_directional(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services& services) { + void attach_light_directional(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services& /*services*/) { auto &light = manager.add<gfx::DirectionalLight>(id); light.position = spec.get<math::vec3>("direction", -math::UP); light.ambient = spec.get<math::vec3>("ambient", gfx::colours::WHITE); @@ -160,7 +163,7 @@ namespace fggl::gfx { light.diffuse = spec.get<math::vec3>("diffuse", gfx::colours::WHITE); } - void attach_light_point(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services& services) { + void attach_light_point(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services& /*services*/) { auto &light = manager.add<gfx::PointLight>(id); light.position = spec.get<math::vec3>("position", math::VEC3_ZERO); diff --git a/fggl/grid/hexagon.cpp b/fggl/grid/hexagon.cpp index b07b598167f794aa34c3d611f7bde599a58a8baa..6827b4f0c44c182b0b5a6dcee7b2af492e86b4fd 100644 --- a/fggl/grid/hexagon.cpp +++ b/fggl/grid/hexagon.cpp @@ -21,7 +21,7 @@ namespace fggl::grid { std::vector<IntHex> lineTo(const IntHex& start, const IntHex& end) { - int distance = start.distance(end); + const int distance = start.distance(end); std::vector<IntHex> line; for (auto i=0; i < distance; ++i) { line.push_back( round2(hexLerp(start, end, 1.0F/distance * i)) ); diff --git a/fggl/gui/renderer/renderer.cpp b/fggl/gui/renderer/renderer.cpp index 8e336736ab3e21ca78ec5e2fb484a275af8898f7..2166035c9c3066cb62848e549fbc84d0ada53b25 100644 --- a/fggl/gui/renderer/renderer.cpp +++ b/fggl/gui/renderer/renderer.cpp @@ -20,6 +20,8 @@ namespace fggl::gui::renderer { + constexpr int PADDING = 15; + void draw_box(gfx::Path2D &path, glm::vec2 topLeft, glm::vec2 bottomRight) { path.moveTo({topLeft.x, topLeft.y}); path.pathTo({bottomRight.x, topLeft.y}); @@ -130,7 +132,7 @@ namespace fggl::gui::renderer { if ( root.hasAttr("text") ) { auto text = root.get<std::string>("text"); - paint.text(text, {background.left, background.top + 15}); + paint.text(text, {background.left, background.top + PADDING}); } for (const auto& child : root) { diff --git a/fggl/platform/linux/paths.cpp b/fggl/platform/linux/paths.cpp index 39a2e1e261a951e6f984eaed7bf8c2dcb76c2d31..e2030db8c394c31faf9ef36c2ec5a2e252b93e12 100644 --- a/fggl/platform/linux/paths.cpp +++ b/fggl/platform/linux/paths.cpp @@ -25,31 +25,33 @@ namespace fggl::platform { - inline static auto get_user_path(const char *env, const char *fallback) -> std::filesystem::path { - const char *path = std::getenv(env); - if (path != nullptr) { - return {path}; + namespace { + inline auto get_user_path(const char *env, const char *fallback) -> std::filesystem::path { + const char *path = std::getenv(env); + if (path != nullptr) { + return {path}; + } + return {fallback}; } - return {fallback}; - } - static auto get_path_list(const char *env, const char *folderName) -> std::vector<std::filesystem::path> { - const char *pathList = std::getenv(env); - std::vector<std::filesystem::path> paths; - if (pathList) { - std::string pathListStr(pathList); - std::string::size_type pos = 0; - while (pos < pathListStr.size()) { - std::string::size_type nextPos = pathListStr.find(':', pos); - if (nextPos == std::string::npos) { - nextPos = pathListStr.size(); + auto get_path_list(const char *env, const char *folderName) -> std::vector<std::filesystem::path> { + const char *pathList = std::getenv(env); + std::vector<std::filesystem::path> paths; + if (pathList) { + std::string pathListStr(pathList); + std::string::size_type pos = 0; + while (pos < pathListStr.size()) { + std::string::size_type nextPos = pathListStr.find(':', pos); + if (nextPos == std::string::npos) { + nextPos = pathListStr.size(); + } + std::string path = pathListStr.substr(pos, nextPos - pos); + paths.push_back(std::filesystem::path(path) / folderName); + pos = nextPos + 1; } - std::string path = pathListStr.substr(pos, nextPos - pos); - paths.push_back(std::filesystem::path(path) / folderName); - pos = nextPos + 1; } + return paths; } - return paths; } auto calc_engine_paths(const char *base) -> EnginePaths { @@ -98,7 +100,7 @@ namespace fggl::platform { return debugPath; } - // if the file existed, it shoudl exist in the user space + // if the file existed, it should exist in the user space return userPath; } diff --git a/fggl/scenes/game.cpp b/fggl/scenes/game.cpp index bf104d23ec77572d2aa0a4ce7a51d5c8b5f34c88..3fb852571f6fa7ebf59f900fe76ea048b71343bd 100644 --- a/fggl/scenes/game.cpp +++ b/fggl/scenes/game.cpp @@ -28,7 +28,7 @@ namespace fggl::scenes { m_input = app.service<input::Input>(); } - void GameBase::update(float dt) { + void GameBase::update(float /*dt*/) { // detect the user quitting if (m_input != nullptr) { bool escapePressed = m_input->keyboard.pressed(glfwGetKeyScancode(GLFW_KEY_ESCAPE)); @@ -59,7 +59,7 @@ namespace fggl::scenes { m_world.reset(); } - void Game::update(float dt) { + void Game::update(float /*dt*/) { assert(m_world && "called game update, but there was no world - was activate called?"); if (m_input != nullptr) { diff --git a/fggl/scenes/menu.cpp b/fggl/scenes/menu.cpp index b7330a7d8d784ab77281feadcc38b3139757ea7b..12b469591dc14131e71cbbefdef0e4f2ffbadd1b 100644 --- a/fggl/scenes/menu.cpp +++ b/fggl/scenes/menu.cpp @@ -22,8 +22,10 @@ namespace fggl::scenes { using fggl::input::MouseButton; using fggl::input::MouseAxis; - BasicMenu::BasicMenu(fggl::App &app) : AppState(app), m_inputs(nullptr), m_active(), m_hover(nullptr) { - m_inputs = app.service<input::Input>(); + constexpr float SCREEN_WIDTH = 1920.0F; + constexpr float SCREEN_HEIGHT = 1080.0F; + + BasicMenu::BasicMenu(fggl::App &app) : AppState(app), m_inputs(app.service<input::Input>()), m_active(), m_cursorPos(), m_hover(nullptr) { } void BasicMenu::update(float /*dt*/) { @@ -33,8 +35,8 @@ namespace fggl::scenes { // in canvas space math::vec2 projected; - projected.x = math::rescale_ndc(m_cursorPos.x, 0, 1920.0F); - projected.y = math::rescale_ndc(m_cursorPos.y, 0, 1080.0F); + projected.x = math::rescale_ndc(m_cursorPos.x, 0, SCREEN_WIDTH); + projected.y = math::rescale_ndc(m_cursorPos.y, 0, SCREEN_HEIGHT); m_canvas.onMouseOver(projected); if (m_inputs->mouse.pressed(MouseButton::LEFT)) { @@ -71,7 +73,7 @@ namespace fggl::scenes { // figure out the position based off the old logic // FIXME should be the container's job - math::vec2 pos{1920.0F - (padX + btnSize.x), padY}; + math::vec2 pos{SCREEN_WIDTH - (padX + btnSize.x), padY}; pos.y += ( (m_items.size()-1.0F) * (btnSize.y + spacing)); // build the button diff --git a/include/fggl/app.hpp b/include/fggl/app.hpp index 3da371bb920209299915f7733370532c4eae4268..b07203a601e381c73cb2687cd0e2907dd6009189 100644 --- a/include/fggl/app.hpp +++ b/include/fggl/app.hpp @@ -15,7 +15,7 @@ #ifndef FGGL_INCLUDE_FGGL_APP_HPP #define FGGL_INCLUDE_FGGL_APP_HPP -#define assertm(exp, msg) assert(((void)(msg), exp)) +#define ASSERT_MSG(exp, msg) assert(((void)(msg), exp)) #include <cassert> #include <string> @@ -86,8 +86,8 @@ namespace fggl { class App { public: - explicit App(modules::Manager *serivces, const Identifer &name); - App(modules::Manager *services, const Identifer &name, const Identifer &folderName); + explicit App(modules::Manager *manager, const Identifer &name); + App(modules::Manager *manager, const Identifer &name, const Identifer &folderName); // class is non copy-able App(const App &app) = delete; diff --git a/include/fggl/util/states.hpp b/include/fggl/util/states.hpp index 943ffb851311680d23f44c12c1f9a9c86920005f..54fbc1bcdbaa8367a172fa2bcd41b3949735849c 100644 --- a/include/fggl/util/states.hpp +++ b/include/fggl/util/states.hpp @@ -63,7 +63,7 @@ namespace fggl::util { } StateType &active() const { - assertm(m_states.find(m_active) != m_states.end(), "active state does not exist!"); + ASSERT_MSG(m_states.find(m_active) != m_states.end(), "active state does not exist!"); return *(m_states.at(m_active).get()); }