summaryrefslogtreecommitdiff
path: root/include/vcl/opengl/OpenGLContext.hxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-08-10 09:21:06 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-10 10:27:59 +0200
commit3f40147a1cf1a76d69a491989f2ef87b150ec7fa (patch)
tree71e049ed0791c0453062c97348f8e302496926e8 /include/vcl/opengl/OpenGLContext.hxx
parentf74ad471eee76ecb30f6ec41141c35242426e3be (diff)
Delete copy ctors/assignments for DLLEXPORT class
Same as ee405fb2ef36337851801f1bd34411c606d55988 for GraphicHelper, but this time for OpenGLContext. Change-Id: I8822f7bffa543ca7b9d0ef541acd0cbdc2b3c46a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120239 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/vcl/opengl/OpenGLContext.hxx')
-rw-r--r--include/vcl/opengl/OpenGLContext.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index 3c48d3687571..428df1266042 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -46,6 +46,14 @@ protected:
public:
static rtl::Reference<OpenGLContext> Create();
virtual ~OpenGLContext();
+
+ // Avoid implicitly defined copy constructors/assignments for the DLLPUBLIC class (they may
+ // require forward-declared classes used internally to be defined in places using OpenGLContext)
+ OpenGLContext(const OpenGLContext&) = delete;
+ OpenGLContext(OpenGLContext&&) = delete;
+ OpenGLContext& operator=(const OpenGLContext&) = delete;
+ OpenGLContext& operator=(OpenGLContext&&) = delete;
+
void acquire() { mnRefCount++; }
void release() { if ( --mnRefCount == 0 ) delete this; }
void dispose();