summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-24 15:10:12 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-24 15:10:12 +0100
commit66954316ca8987b1c8f21249e72e906eaaa475e6 (patch)
treeebedbf7f84f6528e24c2ff2b4a017cced5538d89
parent3211dad3539511ed2988d733721fc0d62431fd40 (diff)
b
-rw-r--r--compat/assert.hpp20
-rw-r--r--compat/prelude.hpp10
-rw-r--r--wall-tileset-tool/main.cpp7
3 files changed, 17 insertions, 20 deletions
diff --git a/compat/assert.hpp b/compat/assert.hpp
index 550933fa..bdb6b578 100644
--- a/compat/assert.hpp
+++ b/compat/assert.hpp
@@ -92,16 +92,16 @@
{ \
if (a != b) [[unlikely]] \
{ \
- FATAL_nospace << Debug::color(Debug::Color::Magenta) \
- << "fatal:" \
- << Debug::resetColor << " " \
- << "Equality assertion failed at " \
- << __FILE__ << ":" << __LINE__; \
- FATAL_nospace << #__VA_ARGS__; \
- FATAL_nospace << " expected: " << a; \
- FATAL_nospace << " actual: " << b; \
- fm_EMIT_ABORT(); \
- } \
+ WARN_nospace << Debug::color(Debug::Color::Magenta) \
+ << "fatal:" \
+ << Debug::resetColor << " " \
+ << "Equality assertion failed at " \
+ << __FILE__ << ":" << __LINE__; \
+ WARN_nospace << #__VA_ARGS__; \
+ WARN_nospace << " expected: " << a; \
+ WARN_nospace << " actual: " << b; \
+ fm_EMIT_ABORT(); \
+ } \
})(__VA_ARGS__)
#ifdef __GNUG__
diff --git a/compat/prelude.hpp b/compat/prelude.hpp
index 973e99d7..79f54942 100644
--- a/compat/prelude.hpp
+++ b/compat/prelude.hpp
@@ -6,14 +6,12 @@
#include <Magnum/Magnum.h>
#define DBG_nospace (::Corrade::Utility::Debug{::Corrade::Utility::Debug::Flag::NoSpace})
-#define WARNING_nospace (::Corrade::Utility::Warning{::Corrade::Utility::Debug::Flag::NoSpace})
-#define ERROR_nospace (::Corrade::Utility::Error{::Corrade::Utility::Debug::Flag::NoSpace})
-#define FATAL_nospace (::Corrade::Utility::Fatal{::Corrade::Utility::Debug::Flag::NoSpace})
+#define WARN_nospace (::Corrade::Utility::Warning{::Corrade::Utility::Debug::Flag::NoSpace})
+#define ERR_nospace (::Corrade::Utility::Error{::Corrade::Utility::Debug::Flag::NoSpace})
#define DBG (::Corrade::Utility::Debug{})
-#define WARNING (::Corrade::Utility::Warning{})
-#define ERROR (::Corrade::Utility::Error{})
-#define FATAL (::Corrade::Utility::Fatal{})
+#define WARN (::Corrade::Utility::Warning{})
+#define ERR (::Corrade::Utility::Error{})
#if !(defined __cpp_size_t_suffix || defined _MSC_VER && _MSVC_LANG < 202004)
#ifdef _MSC_VER
diff --git a/wall-tileset-tool/main.cpp b/wall-tileset-tool/main.cpp
index f7c92772..974273fc 100644
--- a/wall-tileset-tool/main.cpp
+++ b/wall-tileset-tool/main.cpp
@@ -77,16 +77,15 @@ bool do_direction(state& st, Direction_ i)
{
char errbuf[128];
auto error = get_error_string(errbuf);
- Fatal{Fatal::Flag::NoSpace} << "fatal: direction '" << name
- << "' has missing directory '" << dir
- << "': " << error;
+ WARN_nospace << "fatal: direction '" << name
+ << "' has missing directory '" << dir
+ << "': " << error;
return false;
}
auto dir_count = st.old_atlas.direction_mask.count();
st.new_atlas.direction_array = std::vector<Direction>{dir_count};
-
return true;
}