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/Compositor.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/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 18db8f16..9360875a 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -910,7 +910,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { // Send an event g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(pWindow) + "," + pWindow->m_szTitle}); - g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", getFormat("{:x}", (uintptr_t)pWindow)}); + g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", std::format("{:x}", (uintptr_t)pWindow)}); EMIT_HOOK_EVENT("activeWindow", pWindow); @@ -2183,13 +2183,13 @@ CWindow* CCompositor::getWindowByRegex(const std::string& regexp) { break; } case MODE_ADDRESS: { - std::string addr = getFormat("0x{:x}", (uintptr_t)w.get()); + std::string addr = std::format("0x{:x}", (uintptr_t)w.get()); if (matchCheck != addr) continue; break; } case MODE_PID: { - std::string pid = getFormat("{}", w->getPID()); + std::string pid = std::format("{}", w->getPID()); if (matchCheck != pid) continue; break; |
