summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/pretty-function.hpp7
-rw-r--r--editor/inspect-types.cpp1
-rw-r--r--entity/name-of.hpp7
3 files changed, 9 insertions, 6 deletions
diff --git a/compat/pretty-function.hpp b/compat/pretty-function.hpp
new file mode 100644
index 00000000..b735ca5e
--- /dev/null
+++ b/compat/pretty-function.hpp
@@ -0,0 +1,7 @@
+#pragma once
+
+#if defined _MSC_VER
+#define FM_PRETTY_FUNCTION __FUNCSIG__
+#else
+#define FM_PRETTY_FUNCTION __PRETTY_FUNCTION__
+#endif
diff --git a/editor/inspect-types.cpp b/editor/inspect-types.cpp
index eac5140c..fba0fc7b 100644
--- a/editor/inspect-types.cpp
+++ b/editor/inspect-types.cpp
@@ -156,6 +156,7 @@ template<> struct entity_accessors<hole, inspect_intent_t>
&hole::height,
&hole::set_height,
[](const hole& x) { return x.flags.is_wall ? st::enabled : st::readonly; },
+ constantly(constraints::range<uint8_t>{0, tile_size_z}),
},
E::type<uint8_t>::field{"z-offset"_s,
&hole::z_offset,
diff --git a/entity/name-of.hpp b/entity/name-of.hpp
index ea65b52f..2a358896 100644
--- a/entity/name-of.hpp
+++ b/entity/name-of.hpp
@@ -1,13 +1,8 @@
#pragma once
#include "compat/assert.hpp"
+#include "compat/pretty-function.hpp"
#include <cr/StringView.h>
-#if defined _MSC_VER
-#define FM_PRETTY_FUNCTION __FUNCSIG__
-#else
-#define FM_PRETTY_FUNCTION __PRETTY_FUNCTION__
-#endif
-
template<typename T>
static constexpr auto _fm_internal_type_name_of() // NOLINT(bugprone-reserved-identifier)
{