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) } };