From 1607ec48c3aed330166808d94ea189992f120ae2 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sun, 26 Apr 2020 21:17:27 +0200 Subject: [PATCH] Fix -Wunused-function warning --- src/common/intl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 0ba14ae524..dd5bc99ace 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -91,11 +91,13 @@ static wxLocale *wxSetLocale(wxLocale *pLocale); namespace { +#if defined(__UNIX__) // get just the language part ("en" in "en_GB") inline wxString ExtractLang(const wxString& langFull) { return langFull.BeforeFirst('_'); } +#endif // helper functions of GetSystemLanguage() #ifdef __UNIX__ @@ -606,7 +608,7 @@ bool wxLocale::Init(int language, int flags) namespace { -#ifndef __WXOSX__ +#if defined(__UNIX__) && !defined(__WXOSX__) // Small helper function: get the value of the given environment variable and // return true only if the variable was found and has non-empty value. inline bool wxGetNonEmptyEnvVar(const wxString& name, wxString* value)