From 867a22c2a989b3f3a2bc47044226f5f9df6a59fd Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 5 Feb 2025 05:09:11 +0100 Subject: compat/assert: move internal functions to own namespace --- src/script.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/script.cpp b/src/script.cpp index f2b7d30d..23d11e0d 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -5,6 +5,8 @@ namespace floormat { namespace { +namespace fm_debug = floormat::debug::detail; + constexpr StringView names[(size_t)script_lifecycle::COUNT] = { "no-init"_s, "initializing"_s, "created"_s, "destroying"_s, "torn-down"_s, @@ -23,10 +25,10 @@ StringView base_script::state_name(script_lifecycle x) void base_script::_assert_state(script_lifecycle old_state, script_lifecycle s, const char* file, int line) { if (old_state != s) [[unlikely]] - fm_emit_abort(file, line, - "invalid state transition from '%s' to '%s'", - state_name(old_state).data(), - state_name(s).data()); + fm_debug::emit_abort(file, line, + "invalid state transition from '%s' to '%s'", + state_name(old_state).data(), + state_name(s).data()); } base_script::~base_script() noexcept = default; -- cgit v1.2.3