From 5da286487ae79703c4b918c00f9542be67d8e660 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Thu, 25 Apr 2024 22:33:53 +0000 Subject: [PATCH] Address clang-tidy-18 warnings on Linux --- src/SFML/Window/Unix/Display.cpp | 4 ++-- src/SFML/Window/Unix/Utils.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SFML/Window/Unix/Display.cpp b/src/SFML/Window/Unix/Display.cpp index 174d88633..d03c8e8a1 100644 --- a/src/SFML/Window/Unix/Display.cpp +++ b/src/SFML/Window/Unix/Display.cpp @@ -108,10 +108,10 @@ std::shared_ptr<_XIM> openXim() xim = sharedXIM; // Restore the previous locale - if (prevLoc.length() != 0) + if (!prevLoc.empty()) std::setlocale(LC_ALL, prevLoc.c_str()); - if (prevXLoc.length() != 0) + if (!prevXLoc.empty()) XSetLocaleModifiers(prevXLoc.c_str()); } diff --git a/src/SFML/Window/Unix/Utils.hpp b/src/SFML/Window/Unix/Utils.hpp index 2385bbf13..2437c949f 100644 --- a/src/SFML/Window/Unix/Utils.hpp +++ b/src/SFML/Window/Unix/Utils.hpp @@ -48,7 +48,7 @@ struct XDeleter { void operator()(T* data) const { - XFree(data); + XFree(data); // NOLINT(bugprone-multi-level-implicit-pointer-conversion) } };