summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
Diffstat (limited to 'opencl')
-rw-r--r--opencl/source/openclwrapper.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index 436906340c53..1194758f4f4d 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -94,17 +94,15 @@ OString generateMD5(const void* pData, size_t length)
OString const & getCacheFolder()
{
- static OString aCacheFolder;
-
- if (aCacheFolder.isEmpty())
+ static OString const aCacheFolder = [&]()
{
OUString url("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/");
rtl::Bootstrap::expandMacros(url);
osl::Directory::create(url);
- aCacheFolder = OUStringToOString(url, RTL_TEXTENCODING_UTF8);
- }
+ return OUStringToOString(url, RTL_TEXTENCODING_UTF8);
+ }();
return aCacheFolder;
}