summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 11:48:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 13:00:02 +0100
commit55e42805ea796cc92d2e93dfce9200b9c13eaeb4 (patch)
treeb8543b0dd478ec2adf25fd199a9bf7d126bf824b /opencl
parent2dbd02b576f28224204ac962f6ce20fde6687093 (diff)
improve function-local statics in forms..reportdesign
Change-Id: I285e2e75c8d9cad35445c89f00ef68b155806ea2 Reviewed-on: https://gerrit.libreoffice.org/63703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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;
}