summaryrefslogtreecommitdiff
path: root/zen/i18n.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-08-31 20:07:13 -0400
committerB Stack <bgstack15@gmail.com>2020-08-31 20:07:13 -0400
commit8a27fa9c617533e76673ce61a65e2ba869b52208 (patch)
treeacfdfb3e1046db87040477033fda0df76d92916a /zen/i18n.h
parentMerge branch '11.0' into 'master' (diff)
downloadFreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.tar.gz
FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.tar.bz2
FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.zip
add upstream 11.1
Diffstat (limited to 'zen/i18n.h')
-rw-r--r--zen/i18n.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/zen/i18n.h b/zen/i18n.h
index a70649fe..160b9625 100644
--- a/zen/i18n.h
+++ b/zen/i18n.h
@@ -57,26 +57,21 @@ std::shared_ptr<const TranslationHandler> getTranslator();
//######################## implementation ##############################
namespace impl
{
-inline
-FunStatGlobal<const TranslationHandler>& refGlobalTranslationHandler()
-{
- //getTranslator() may be called even after static objects of this translation unit are destroyed!
- static FunStatGlobal<const TranslationHandler> inst; //external linkage even in header!
- return inst;
-}
+//getTranslator() may be called even after static objects of this translation unit are destroyed!
+inline constinit2 Global<const TranslationHandler> globalTranslationHandler;
}
inline
std::shared_ptr<const TranslationHandler> getTranslator()
{
- return impl::refGlobalTranslationHandler().get();
+ return impl::globalTranslationHandler.get();
}
inline
void setTranslator(std::unique_ptr<const TranslationHandler>&& newHandler)
{
- impl::refGlobalTranslationHandler().set(std::move(newHandler));
+ impl::globalTranslationHandler.set(std::move(newHandler));
}
bgstack15