From 32021bc251bf110338f28271e87964578cf07e1e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 29 Oct 2022 04:04:20 +0200 Subject: fix build --- draw/wall.hpp | 1 + editor/editor.hpp | 1 + editor/events.cpp | 5 ++--- serialize/json-helper.hpp | 2 +- serialize/world-impl.hpp | 2 ++ serialize/world-writer.cpp | 10 ++++++++++ 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/draw/wall.hpp b/draw/wall.hpp index 801d2c06..06d99842 100644 --- a/draw/wall.hpp +++ b/draw/wall.hpp @@ -2,6 +2,7 @@ #include "tile-defs.hpp" #include +#include #include #include #include diff --git a/editor/editor.hpp b/editor/editor.hpp index 9203cd6e..e0fa85cb 100644 --- a/editor/editor.hpp +++ b/editor/editor.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/editor/events.cpp b/editor/events.cpp index 4afc212f..2ba2437b 100644 --- a/editor/events.cpp +++ b/editor/events.cpp @@ -13,7 +13,7 @@ namespace floormat { void app::on_focus_in() noexcept {} void app::on_mouse_enter() noexcept {} -void app::on_any_event(const any_event& event) noexcept {} +void app::on_any_event(const any_event&) noexcept {} #define accessor(type, name) \ type m_##name = {}; auto name() const noexcept { return m_##name; } @@ -86,8 +86,7 @@ void app::on_key_up_down(const key_event& event, bool is_down) noexcept case SDLK_r: return key::rotate_tile; case SDLK_F5: return key::quicksave; case SDLK_F9: return key::quickload; - case SDLK_ESCAPE: return key::quit; - }); + case SDLK_ESCAPE: return key::quit; }); if (x != key::COUNT) { keys[x] = is_down; diff --git a/serialize/json-helper.hpp b/serialize/json-helper.hpp index 9c9d208d..42cd73b3 100644 --- a/serialize/json-helper.hpp +++ b/serialize/json-helper.hpp @@ -1,5 +1,5 @@ #pragma once -#include +#include namespace std::filesystem { class path; } diff --git a/serialize/world-impl.hpp b/serialize/world-impl.hpp index 4cff8794..54e4622c 100644 --- a/serialize/world-impl.hpp +++ b/serialize/world-impl.hpp @@ -4,6 +4,8 @@ #pragma once #include "src/tile.hpp" +#include +#include namespace floormat::Serialize { diff --git a/serialize/world-writer.cpp b/serialize/world-writer.cpp index 8b33d35e..84d894bd 100644 --- a/serialize/world-writer.cpp +++ b/serialize/world-writer.cpp @@ -48,6 +48,9 @@ constexpr auto chunkbuf_size = #ifdef __GNUG__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#elif defined _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4996) #endif writer_state::writer_state(const struct world& world) : world{&world} @@ -59,6 +62,8 @@ writer_state::writer_state(const struct world& world) : world{&world} #ifdef __GNUG__ #pragma GCC diagnostic pop +#elif defined _MSC_VER +#pragma warning(pop) #endif atlasid writer_state::intern_atlas(const tile_image& img) @@ -188,6 +193,9 @@ void writer_state::serialize_atlases() #ifdef __GNUG__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#elif defined _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4996) #endif ArrayView writer_state::serialize_world() @@ -235,6 +243,8 @@ ArrayView writer_state::serialize_world() #ifdef __GNUG__ #pragma GCC diagnostic pop +#elif defined _MSC_VER +#pragma warning(pop) #endif } // namespace -- cgit v1.2.3