From 6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Apr 2013 17:06:02 +0300 Subject: another fixes from cpplint. --- src/client.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/client.cpp') 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(("LANG=" + lang).c_str())); + putenv(const_cast(("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((std::string(name) + + "=" + value).c_str()))) #else if (setenv(name, value, 1)) #endif + { logger->log("setenv failed: %s=%s", name, value); + } } void Client::testsClear() -- cgit v1.2.3-60-g2f50