diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-24 12:05:40 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-24 12:05:40 +0200 |
commit | 5385be91cf40b9e610f3c7c9488023b925b563e1 (patch) | |
tree | 0ab01c932e1a80ad002d4e109ed448aa28663d20 /main/debug.cpp | |
parent | 2b5e90cfb9c256ae26d9a970a7ff24c9dc0c2bf1 (diff) |
a
Diffstat (limited to 'main/debug.cpp')
-rw-r--r-- | main/debug.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/main/debug.cpp b/main/debug.cpp index 14cdad00..04c76343 100644 --- a/main/debug.cpp +++ b/main/debug.cpp @@ -6,8 +6,7 @@ namespace floormat { using Severity = GL::DebugOutput::Severity; // NOLINTNEXTLINE(readability-convert-member-functions-to-static) -void main_impl::debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Type type, UnsignedInt id, - Severity severity, const std::string& str) const +void main_impl::debug_callback(unsigned src, unsigned type, unsigned id, unsigned severity, const std::string& str) const { static thread_local auto clock = std::chrono::steady_clock{}; static const auto t0 = clock.now(); @@ -29,7 +28,7 @@ void main_impl::debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Typ const auto t = std::chrono::duration_cast<seconds>(clock.now() - t0).count(); printf("[%10.03f] ", t); - switch (severity) + switch (Severity{severity}) { using enum GL::DebugOutput::Severity; case Notification: std::fputs("fm_debug ", stdout); break; @@ -52,10 +51,10 @@ void main_impl::debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Typ std::fputs("", stdout); // put breakpoint here } -void main_impl::_debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Type type, UnsignedInt id, - GL::DebugOutput::Severity severity, const std::string& str, const void* self) +static void _debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Type type, UnsignedInt id, + GL::DebugOutput::Severity severity, const std::string& str, const void* self) { - static_cast<const main_impl*>(self)->debug_callback(src, type, id, severity, str); + static_cast<const main_impl*>(self)->debug_callback((unsigned)src, (unsigned)type, (unsigned)id, (unsigned)severity, str); } void main_impl::register_debug_callback() |