From be5c52a1fce71db4ed2d2621b06b1111de18975b Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sun, 31 Dec 2023 14:37:24 -0700 Subject: [PATCH] Use `std::` namespace --- src/SFML/Window/Unix/Display.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SFML/Window/Unix/Display.cpp b/src/SFML/Window/Unix/Display.cpp index 457f201a2..20fcefe49 100644 --- a/src/SFML/Window/Unix/Display.cpp +++ b/src/SFML/Window/Unix/Display.cpp @@ -36,6 +36,7 @@ #include #include +#include #include @@ -104,11 +105,11 @@ XIM openXim() // the IM and properly receiving text // First save the previous ones (this might be able to be written more elegantly?) const char* p; - const std::string prevLoc((p = setlocale(LC_ALL, nullptr)) ? p : ""); + const std::string prevLoc((p = std::setlocale(LC_ALL, nullptr)) ? p : ""); const std::string prevXLoc((p = XSetLocaleModifiers(nullptr)) ? p : ""); // Set the locales from environment - setlocale(LC_ALL, ""); + std::setlocale(LC_ALL, ""); XSetLocaleModifiers(""); // Create the input context @@ -116,7 +117,7 @@ XIM openXim() // Restore the previous locale if (prevLoc.length() != 0) - setlocale(LC_ALL, prevLoc.c_str()); + std::setlocale(LC_ALL, prevLoc.c_str()); if (prevXLoc.length() != 0) XSetLocaleModifiers(prevXLoc.c_str());