mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Use std::
namespace
This commit is contained in:
parent
115344ecc3
commit
be5c52a1fc
@ -36,6 +36,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <clocale>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
|
||||||
@ -104,11 +105,11 @@ XIM openXim()
|
|||||||
// the IM and properly receiving text
|
// the IM and properly receiving text
|
||||||
// First save the previous ones (this might be able to be written more elegantly?)
|
// First save the previous ones (this might be able to be written more elegantly?)
|
||||||
const char* p;
|
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 : "");
|
const std::string prevXLoc((p = XSetLocaleModifiers(nullptr)) ? p : "");
|
||||||
|
|
||||||
// Set the locales from environment
|
// Set the locales from environment
|
||||||
setlocale(LC_ALL, "");
|
std::setlocale(LC_ALL, "");
|
||||||
XSetLocaleModifiers("");
|
XSetLocaleModifiers("");
|
||||||
|
|
||||||
// Create the input context
|
// Create the input context
|
||||||
@ -116,7 +117,7 @@ XIM openXim()
|
|||||||
|
|
||||||
// Restore the previous locale
|
// Restore the previous locale
|
||||||
if (prevLoc.length() != 0)
|
if (prevLoc.length() != 0)
|
||||||
setlocale(LC_ALL, prevLoc.c_str());
|
std::setlocale(LC_ALL, prevLoc.c_str());
|
||||||
|
|
||||||
if (prevXLoc.length() != 0)
|
if (prevXLoc.length() != 0)
|
||||||
XSetLocaleModifiers(prevXLoc.c_str());
|
XSetLocaleModifiers(prevXLoc.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user