logging/format: use std::format_string to catch formatting string errors at compile time (#3377)

* fix(log): use constexpr format string

* deprecate getFormat
This commit is contained in:
memchr 2023-09-20 07:26:20 +00:00 committed by GitHub
parent d8d0cd75c2
commit 6594b50e57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 130 additions and 171 deletions

View file

@ -1611,7 +1611,7 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
const auto PREFERREDMODE = wlr_output_preferred_mode(pMonitor->output);
if (!PREFERREDMODE) {
Debug::log(ERR, "Monitor {} has NO PREFERRED MODE, and an INVALID one was requested: {}x{}@{:2f}", (int)pMonitorRule->resolution.x,
Debug::log(ERR, "Monitor {} has NO PREFERRED MODE, and an INVALID one was requested: {}x{}@{:2f}", pMonitor->ID, (int)pMonitorRule->resolution.x,
(int)pMonitorRule->resolution.y, (float)pMonitorRule->refreshRate);
return true;
}
@ -1724,7 +1724,7 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
const auto PREFERREDMODE = wlr_output_preferred_mode(pMonitor->output);
if (!PREFERREDMODE) {
Debug::log(ERR, "Monitor {} has NO PREFERRED MODE, and an INVALID one was requested: {}x{}@{:2f}", (int)pMonitorRule->resolution.x,
Debug::log(ERR, "Monitor {} has NO PREFERRED MODE, and an INVALID one was requested: {}x{}@{:2f}", pMonitor->ID, (int)pMonitorRule->resolution.x,
(int)pMonitorRule->resolution.y, (float)pMonitorRule->refreshRate);
return true;
}