From 6aa66b84c1346c32832b1b4bd17e48eb6880c15e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 3 Jul 2017 10:50:20 +0200 Subject: [PATCH] CLocaleManager: add casted version of getText() function Allows easier handling with strings instead const char for usage as string source. Separate casts are not requiered. Overload of getText() was not possible but, name getTextAsString() is keeping namespace of base function getText(). --- src/system/localize.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/localize.h b/src/system/localize.h index b12b430fd..0794ff499 100644 --- a/src/system/localize.h +++ b/src/system/localize.h @@ -69,6 +69,7 @@ class CLocaleManager loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false); const char * getText(const neutrino_locale_t keyName) const; + std::string getTextAsString(const neutrino_locale_t keyName) const {return (static_cast(getText(keyName)));} static neutrino_locale_t getMonth (const struct tm * struct_tm_p); static neutrino_locale_t getMonth (const int mon);