Fix compilation under MSVC and remove unnecessary conditional function prototype
authorkwolekr <kwolekr@minetest.net>
Sat, 24 Oct 2015 17:31:42 +0000 (13:31 -0400)
committerkwolekr <kwolekr@minetest.net>
Sat, 24 Oct 2015 17:34:49 +0000 (13:34 -0400)
Thanks to SmallJoker for pointing this out.

src/gettext.cpp
src/gettext.h
src/main.cpp

index 26b16f434fedf52a2102f7ac2c28e15b379050d2..1fab875e5e14745272beee1e12ff156695a3358a 100644 (file)
@@ -117,12 +117,8 @@ const char* MSVC_LocaleLookup(const char* raw_shortname) {
 #endif
 
 /******************************************************************************/
-#ifdef _MSC_VER
 void init_gettext(const char *path, const std::string &configured_language,
-       int argc, const char *argv[])
-#else
-void init_gettext(const char *path, const std::string &configured_language)
-#endif
+       int argc, char *argv[])
 {
 #if USE_GETTEXT
        // First, try to set user override environment
index cb3a141608036300ddd65781571748f365f05df2..b8d27f77ceb82a2b229ba8e01b24b4baf461a0cd 100644 (file)
@@ -32,12 +32,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define gettext_noop(String) (String)
 #define N_(String) gettext_noop((String))
 
-#ifdef _MSC_VER
 void init_gettext(const char *path, const std::string &configured_language,
-               int argc, const char *argv[]);
-#else
-void init_gettext(const char *path, const std::string &configured_language);
-#endif
+       int argc, char *argv[]);
 
 extern wchar_t *utf8_to_wide_c(const char *str);
 
index d5fcae2f79caeb7a55adc696289ae2768bc89b5f..1538c15d49271b8cd9dbe4df80c8a835d1b04d63 100644 (file)
@@ -450,13 +450,8 @@ static bool init_common(const Settings &cmd_args, int argc, char *argv[])
        // Initialize HTTP fetcher
        httpfetch_init(g_settings->getS32("curl_parallel_limit"));
 
-#ifdef _MSC_VER
        init_gettext(porting::path_locale.c_str(),
                g_settings->get("language"), argc, argv);
-#else
-       init_gettext(porting::path_locale.c_str(),
-               g_settings->get("language"));
-#endif
 
        return true;
 }