summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-05-07 20:47:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-07 22:38:50 +0200
commitb1432ad59d6210da49e8c5c113ef2585d2203ca9 (patch)
treea99eb61bdc0a470ca7a3328c8c16a85c7b71ac36 /desktop
parentAdd gb_Library_add_generated_asmobjects (diff)
downloadcore-master.tar.gz
core-master.zip
workaround compiler crash on macos-intel HEADmaster
Change-Id: I779785c068fd04e314b4d6c22d9fe66d9aa88736 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167294 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx28
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx19
2 files changed, 26 insertions, 21 deletions
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index bd22a8a788b4..77239ec4e4b9 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -31,25 +31,29 @@ namespace dp_misc
{
namespace
{
+ OUString StrOperatingSystemInit()
+ {
+ OUString os( u"$_OS"_ustr );
+ ::rtl::Bootstrap::expandMacros( os );
+ return os;
+ }
+
const OUString & StrOperatingSystem()
{
- static const OUString theOS = []()
- {
- OUString os( u"$_OS"_ustr );
- ::rtl::Bootstrap::expandMacros( os );
- return os;
- }();
+ static const OUString theOS = StrOperatingSystemInit();
return theOS;
};
+ OUString StrCPUInit()
+ {
+ OUString arch( u"$_ARCH"_ustr );
+ ::rtl::Bootstrap::expandMacros( arch );
+ return arch;
+ }
+
const OUString & StrCPU()
{
- static const OUString theCPU = []()
- {
- OUString arch( u"$_ARCH"_ustr );
- ::rtl::Bootstrap::expandMacros( arch );
- return arch;
- }();
+ static const OUString theCPU = StrCPUInit();
return theCPU;
};
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 5577a840faf6..c0b7058b2206 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -155,17 +155,18 @@ bool readArgument(
}
+static OUString getExecutableDirInit()
+{
+ OUString path;
+ if (osl_getExecutableFile( &path.pData ) != osl_Process_E_None) {
+ throw RuntimeException(u"cannot locate executable directory!"_ustr,nullptr);
+ }
+ return path.copy( 0, path.lastIndexOf( '/' ) );
+}
+
OUString const & getExecutableDir()
{
- static const OUString EXEC =
- []()
- {
- OUString path;
- if (osl_getExecutableFile( &path.pData ) != osl_Process_E_None) {
- throw RuntimeException(u"cannot locate executable directory!"_ustr,nullptr);
- }
- return path.copy( 0, path.lastIndexOf( '/' ) );
- }();
+ static const OUString EXEC = getExecutableDirInit();
return EXEC;
}