summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-11-16 10:36:24 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2019-11-16 11:45:21 +0100
commit130c1ae09451c268fcd4f2d55f65ac7dc9581342 (patch)
tree642a15b3ca13a6f5e06e09f372a0f647eeec502b /desktop
parent16fbe76fd05e96f0aa1a39498a0d7fd56a5b9c5f (diff)
Replace some std::once with static initializers
Change-Id: I6234bc252dac5b1c29e3f1ef844cf51f56aaa7ac Reviewed-on: https://gerrit.libreoffice.org/82970 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index ef94b0d96da3..31f7abbf9b4e 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -394,18 +394,12 @@ namespace
OUString ReplaceStringHookProc( const OUString& rStr )
{
- const static OUString sBuildId(utl::Bootstrap::getBuildIdData("development"));
- static OUString sBrandName, sVersion, sAboutBoxVersion, sAboutBoxVersionSuffix, sExtension;
-
- static std::once_flag aInitOnce;
- std::call_once(aInitOnce, []
- {
- sBrandName = utl::ConfigManager::getProductName();
- sVersion = utl::ConfigManager::getProductVersion();
- sAboutBoxVersion = utl::ConfigManager::getAboutBoxProductVersion();
- sAboutBoxVersionSuffix = utl::ConfigManager::getAboutBoxProductVersionSuffix();
- sExtension = utl::ConfigManager::getProductExtension();
- } );
+ const static OUString sBuildId(utl::Bootstrap::getBuildIdData("development")),
+ sBrandName(utl::ConfigManager::getProductName()),
+ sVersion(utl::ConfigManager::getProductVersion()),
+ sAboutBoxVersion(utl::ConfigManager::getAboutBoxProductVersion()),
+ sAboutBoxVersionSuffix(utl::ConfigManager::getAboutBoxProductVersionSuffix()),
+ sExtension(utl::ConfigManager::getProductExtension());
OUString sRet(rStr);
if (sRet.indexOf("%PRODUCT") != -1 || sRet.indexOf("%ABOUTBOX") != -1)