From 20f1ba114c56b13659bb3ccd3dfdbcfc15a3d10e Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 4 Sep 2015 16:51:26 +0300 Subject: [PATCH] Add explanation and enforce non-instantiability Change-Id: I3ea699dcda21b695a486c86d7f7b7a8abc2a8fbe --- include/vcl/opengl/OpenGLHelper.hxx | 6 ++++-- include/vcl/opengl/OpenGLWrapper.hxx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx index 646a2d39254e..9f725e694605 100644 --- a/include/vcl/opengl/OpenGLHelper.hxx +++ b/include/vcl/opengl/OpenGLHelper.hxx @@ -34,9 +34,11 @@ } \ } while (false) -class VCL_DLLPUBLIC OpenGLHelper +// All member functions static and VCL_DLLPUBLIC. Basically a glorified namespace. +struct VCL_DLLPUBLIC OpenGLHelper { -public: + OpenGLHelper() SAL_DELETED_FUNCTION; // Should not be instantiated + static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, const OString& preamble = "" ); /** diff --git a/include/vcl/opengl/OpenGLWrapper.hxx b/include/vcl/opengl/OpenGLWrapper.hxx index c2f44c0c6b6b..4d3a9e9ab57b 100644 --- a/include/vcl/opengl/OpenGLWrapper.hxx +++ b/include/vcl/opengl/OpenGLWrapper.hxx @@ -14,9 +14,11 @@ #include -class VCL_DLLPUBLIC OpenGLWrapper +// All member functions static and VCL_DLLPUBLIC. Basically a glorified namespace. +struct VCL_DLLPUBLIC OpenGLWrapper { -public: + OpenGLWrapper() SAL_DELETED_FUNCTION; // Should not be instantiated + /** * Returns true if VCL has OpenGL rendering enabled */