diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-06 10:31:14 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-06 21:40:39 +0100 |
commit | 5fa81c74d62fcbfd46d992c38426e952e9eeda4e (patch) | |
tree | 647df470a3b411e920a3b1faf53849034a227390 /src/chunk.cpp | |
parent | 3cff964ecb1395acfaf13a853934c871a2b35484 (diff) |
switch chunk reload messages to verbose (from standard) log level
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r-- | src/chunk.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp index dcb7d030..cc8eb3f6 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -22,6 +22,20 @@ bool is_log_quiet() return !!(flags & GLCCF::QuietLog); } +bool is_log_verbose() +{ + using GLCCF = GL::Implementation::ContextConfigurationFlag; + auto flags = GL::Context::current().configurationFlags(); + return !!(flags & GLCCF::VerboseLog); +} + +bool is_log_standard() +{ + using GLCCF = GL::Implementation::ContextConfigurationFlag; + auto flags = GL::Context::current().configurationFlags(); + return !(flags & (GLCCF::VerboseLog|GLCCF::QuietLog)); +} + } // namespace bool chunk::empty(bool force) const noexcept @@ -84,7 +98,7 @@ auto chunk::end() const noexcept -> const_iterator { return cend(); } void chunk::mark_ground_modified() noexcept { - if (!_ground_modified && !is_log_quiet()) + if (!_ground_modified && is_log_verbose()) [[unlikely]] fm_debug("ground reload %zu", ++_reload_no_); _ground_modified = true; mark_passability_modified(); @@ -92,7 +106,7 @@ void chunk::mark_ground_modified() noexcept void chunk::mark_walls_modified() noexcept { - if (!_walls_modified && !is_log_quiet()) + if (!_walls_modified && is_log_verbose()) [[unlikely]] fm_debug("wall reload %zu", ++_reload_no_); _walls_modified = true; mark_passability_modified(); @@ -100,14 +114,14 @@ void chunk::mark_walls_modified() noexcept void chunk::mark_scenery_modified() noexcept { - if (!_scenery_modified && !is_log_quiet()) + if (!_scenery_modified && is_log_verbose()) [[unlikely]] fm_debug("scenery reload %zu", ++_reload_no_); _scenery_modified = true; } void chunk::mark_passability_modified() noexcept { - if (!_pass_modified && !is_log_quiet()) + if (!_pass_modified && is_log_verbose()) [[unlikely]] fm_debug("pass reload %zu", ++_reload_no_); _pass_modified = true; } |