[Libreoffice-commits] core.git: include/vcl

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 10 08:28:35 UTC 2021


 include/vcl/opengl/OpenGLContext.hxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 3f40147a1cf1a76d69a491989f2ef87b150ec7fa
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Aug 10 09:21:06 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Aug 10 10:27:59 2021 +0200

    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 at collabora.com>

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();


More information about the Libreoffice-commits mailing list