summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--draw/wall.hpp1
-rw-r--r--editor/editor.hpp1
-rw-r--r--editor/events.cpp5
-rw-r--r--serialize/json-helper.hpp2
-rw-r--r--serialize/world-impl.hpp2
-rw-r--r--serialize/world-writer.cpp10
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 <array>
+#include <Corrade/Containers/ArrayViewStl.h>
#include <Magnum/Math/Vector2.h>
#include <Magnum/Math/Vector3.h>
#include <Magnum/GL/Mesh.h>
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 <optional>
#include <vector>
#include <map>
+#include <string>
#include <memory>
#include <Corrade/Containers/StringView.h>
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 <nlohmann/json_fwd.hpp>
+#include <nlohmann/json.hpp>
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 <bit>
+#include <cstdio>
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<const char> writer_state::serialize_world()
@@ -235,6 +243,8 @@ ArrayView<const char> writer_state::serialize_world()
#ifdef __GNUG__
#pragma GCC diagnostic pop
+#elif defined _MSC_VER
+#pragma warning(pop)
#endif
} // namespace