diff options
| author | memchr <118117622+memchr@users.noreply.github.com> | 2023-09-20 07:26:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-20 08:26:20 +0100 |
| commit | 6594b50e57935dd66930ccd35dba7a1b4131399d (patch) | |
| tree | 17d4fa7aabf0e447c7171346c5b851c999093149 /src/config/ConfigManager.cpp | |
| parent | d8d0cd75c2db16a14086e1d5119ed937a60c701e (diff) | |
logging/format: use std::format_string to catch formatting string errors at compile time (#3377)
* fix(log): use constexpr format string
* deprecate getFormat
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index a487734d..5cad82ff 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1097,7 +1097,7 @@ void CConfigManager::updateBlurredLS(const std::string& name, const bool forceBl for (auto& lsl : m->m_aLayerSurfaceLayers) { for (auto& ls : lsl) { if (BYADDRESS) { - if (getFormat("0x{:x}", (uintptr_t)ls.get()) == matchName) + if (std::format("0x{:x}", (uintptr_t)ls.get()) == matchName) ls->forceBlur = forceBlur; } else if (ls->szNamespace == matchName) ls->forceBlur = forceBlur; @@ -1206,7 +1206,7 @@ void CConfigManager::handleSource(const std::string& command, const std::string& if (auto r = glob(absolutePath(rawpath, configCurrentPath).c_str(), GLOB_TILDE, nullptr, glob_buf.get()); r != 0) { parseError = std::format("source= globbing error: {}", r == GLOB_NOMATCH ? "found no match" : GLOB_ABORTED ? "read error" : "out of memory"); - Debug::log(ERR, parseError); + Debug::log(ERR, "{}", parseError); return; } @@ -1942,7 +1942,7 @@ std::vector<SLayerRule> CConfigManager::getMatchingRules(SLayerSurface* pLS) { for (auto& lr : m_dLayerRules) { if (lr.targetNamespace.find("address:0x") == 0) { - if (getFormat("address:0x{:x}", (uintptr_t)pLS) != lr.targetNamespace) + if (std::format("address:0x{:x}", (uintptr_t)pLS) != lr.targetNamespace) continue; } else { std::regex NSCHECK(lr.targetNamespace); |
