diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-14 17:06:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-14 17:06:02 +0300 |
commit | 6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d (patch) | |
tree | f1acb027394af1aec49790354df97da4665488b7 /src/client.cpp | |
parent | a7d7346b9eb3fa62a8912e31d5c00f8e05390425 (diff) | |
download | manaplus-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.gz manaplus-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.bz2 manaplus-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.xz manaplus-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.zip |
another fixes from cpplint.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp index 08fd2ab27..0562094c5 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -341,8 +341,8 @@ void Client::gameInit() if (lang.empty()) lang = std::string(_nl_locale_name_default()); - putenv((char*)("LANG=" + lang).c_str()); - putenv((char*)("LANGUAGE=" + lang).c_str()); + putenv(const_cast<char*>(("LANG=" + lang).c_str())); + putenv(const_cast<char*>(("LANGUAGE=" + lang).c_str())); // mingw doesn't like LOCALEDIR to be defined for some reason if (lang != "C") bindTextDomain("manaplus", "translations/"); @@ -708,11 +708,14 @@ void Client::setEnv(const char *const name, const char *const value) if (!name || !value) return; #ifdef WIN32 - if (putenv((char*)(std::string(name) + "=" + value).c_str())) + if (putenv(reinterpret_cast<char*>((std::string(name) + + "=" + value).c_str()))) #else if (setenv(name, value, 1)) #endif + { logger->log("setenv failed: %s=%s", name, value); + } } void Client::testsClear() |