1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 15:48:48 -05:00

Fix compilation under MSVC and remove unnecessary conditional function prototype

Thanks to SmallJoker for pointing this out.
This commit is contained in:
kwolekr 2015-10-24 13:31:42 -04:00
parent 127b9aed09
commit 2d207afe8e
3 changed files with 2 additions and 15 deletions

View File

@ -117,12 +117,8 @@ const char* MSVC_LocaleLookup(const char* raw_shortname) {
#endif #endif
/******************************************************************************/ /******************************************************************************/
#ifdef _MSC_VER
void init_gettext(const char *path, const std::string &configured_language, void init_gettext(const char *path, const std::string &configured_language,
int argc, const char *argv[]) int argc, char *argv[])
#else
void init_gettext(const char *path, const std::string &configured_language)
#endif
{ {
#if USE_GETTEXT #if USE_GETTEXT
// First, try to set user override environment // First, try to set user override environment

View File

@ -32,12 +32,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define gettext_noop(String) (String) #define gettext_noop(String) (String)
#define N_(String) gettext_noop((String)) #define N_(String) gettext_noop((String))
#ifdef _MSC_VER
void init_gettext(const char *path, const std::string &configured_language, void init_gettext(const char *path, const std::string &configured_language,
int argc, const char *argv[]); int argc, char *argv[]);
#else
void init_gettext(const char *path, const std::string &configured_language);
#endif
extern wchar_t *utf8_to_wide_c(const char *str); extern wchar_t *utf8_to_wide_c(const char *str);

View File

@ -450,13 +450,8 @@ static bool init_common(const Settings &cmd_args, int argc, char *argv[])
// Initialize HTTP fetcher // Initialize HTTP fetcher
httpfetch_init(g_settings->getS32("curl_parallel_limit")); httpfetch_init(g_settings->getS32("curl_parallel_limit"));
#ifdef _MSC_VER
init_gettext(porting::path_locale.c_str(), init_gettext(porting::path_locale.c_str(),
g_settings->get("language"), argc, argv); g_settings->get("language"), argc, argv);
#else
init_gettext(porting::path_locale.c_str(),
g_settings->get("language"));
#endif
return true; return true;
} }