./
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
10 / 10
100.0%
Branches:
2 / 2
100.0%
Functions:
2 / 2
100.0%

src/internal/config_diagnostics.cpp
Line Branch Exec Source
1 /**
2 * @file internal/config_diagnostics.cpp
3 * @brief Opens and drains the deferred diagnostic record list.
4 * @details internal/config_diagnostics.hpp owns the contract.
5 */
6
7 #include "internal/config_diagnostics.hpp"
8
9 namespace DetourModKit::config::detail
10 {
11 932 DeferredDiagnostics open_deferred_diagnostics() noexcept
12 {
13 1864 return DeferredDiagnostics{
14 932 .threshold = log().get_log_level(),
15 .records = {},
16 932 };
17 }
18
19 1607 void emit_deferred_diagnostics(DeferredDiagnostics &diags) noexcept
20 {
21 1607 Logger &logger = log();
22
2/2
✓ Branch 18 → 5 taken 479 times.
✓ Branch 18 → 19 taken 1607 times.
3693 for (const DeferredDiagnostic &record : diags.records)
23 {
24 479 (void)logger.log_noexcept(record.level, record.line);
25 }
26 1607 diags.records.clear();
27 1607 }
28 } // namespace DetourModKit::config::detail
29