summaryrefslogtreecommitdiffhomepage
path: root/serialize
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-29 04:04:20 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-29 04:04:20 +0200
commit32021bc251bf110338f28271e87964578cf07e1e (patch)
treeb84b84fa2fd38f05c534cff0b0f6c32cf0e17719 /serialize
parent4a9f01fa0e3f1a16c28a43d06ddc18b8d6af5d5d (diff)
fix build
Diffstat (limited to 'serialize')
-rw-r--r--serialize/json-helper.hpp2
-rw-r--r--serialize/world-impl.hpp2
-rw-r--r--serialize/world-writer.cpp10
3 files changed, 13 insertions, 1 deletions
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