diff options
author | B Stack <bgstack15@gmail.com> | 2020-09-01 00:24:17 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-09-01 00:24:17 +0000 |
commit | 5a3f52b016581a6a0cb4513614b6c620d365dde2 (patch) | |
tree | acfdfb3e1046db87040477033fda0df76d92916a /zen/i18n.h | |
parent | Merge branch '11.0' into 'master' (diff) | |
parent | add upstream 11.1 (diff) | |
download | FreeFileSync-5a3f52b016581a6a0cb4513614b6c620d365dde2.tar.gz FreeFileSync-5a3f52b016581a6a0cb4513614b6c620d365dde2.tar.bz2 FreeFileSync-5a3f52b016581a6a0cb4513614b6c620d365dde2.zip |
Merge branch '11.1' into 'master'11.1
add upstream 11.1
See merge request opensource-tracking/FreeFileSync!25
Diffstat (limited to 'zen/i18n.h')
-rw-r--r-- | zen/i18n.h | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -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)); } |