summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-04 09:22:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-04 11:21:22 +0200
commitf45ff1a7147e6a9479c669f082dd74349c6bcb4b (patch)
tree9ec5eee03fe7bbc5e026318efd6dcca3502d4696 /vcl/source/opengl
parent58937aa4a50ecd681382f03331340da4c843b01e (diff)
loplugin:flatten in vcl
Change-Id: I271cc67ecf34acbf0edbda960e33315fb6a1f9dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 6aeb53af17a4..64a470fe5f63 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -845,22 +845,22 @@ void OpenGLZone::hardDisable()
{
// protect ourselves from double calling etc.
static bool bDisabled = false;
- if (!bDisabled)
- {
- bDisabled = true;
-
- // Disable the OpenGL support
- std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
- comphelper::ConfigurationChanges::create());
- officecfg::Office::Common::VCL::UseOpenGL::set(false, xChanges);
- xChanges->commit();
-
- // Force synchronous config write
- css::uno::Reference< css::util::XFlushable >(
- css::configuration::theDefaultProvider::get(
- comphelper::getProcessComponentContext()),
- css::uno::UNO_QUERY_THROW)->flush();
- }
+ if (bDisabled)
+ return;
+
+ bDisabled = true;
+
+ // Disable the OpenGL support
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::VCL::UseOpenGL::set(false, xChanges);
+ xChanges->commit();
+
+ // Force synchronous config write
+ css::uno::Reference< css::util::XFlushable >(
+ css::configuration::theDefaultProvider::get(
+ comphelper::getProcessComponentContext()),
+ css::uno::UNO_QUERY_THROW)->flush();
}
void OpenGLZone::relaxWatchdogTimings()