loplugin:flatten in opencl

Change-Id: I9f45510eddb022013af751d232d4704432717ef6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2020-04-03 10:50:28 +02:00
parent af95bda66d
commit 1511c73aa4

View File

@@ -25,8 +25,9 @@ void OpenCLZone::hardDisable()
{ {
// protect ourselves from double calling etc. // protect ourselves from double calling etc.
static bool bDisabled = false; static bool bDisabled = false;
if (!bDisabled) if (bDisabled)
{ return;
bDisabled = true; bDisabled = true;
std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create()); std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create());
@@ -39,7 +40,6 @@ void OpenCLZone::hardDisable()
xFlushable->flush(); xFlushable->flush();
releaseOpenCLEnv(&openclwrapper::gpuEnv); releaseOpenCLEnv(&openclwrapper::gpuEnv);
}
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */