diff options
author | Albert Astals Cid <aacid@kde.org> | 2018-01-08 18:07:38 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2018-01-08 18:37:33 +0100 |
commit | 8794789a72f845b009656e6d7ae6a00b709e09bc (patch) | |
tree | 82220f5640d4abcf726f6e83e59cd6bb59cc4d67 /poppler/CairoOutputDev.h | |
parent | 4c7814342806b61fedbb2d45ce74462f9dbc20bc (diff) |
Delete lots of copy constructors and copy assignment operators
Fixes rule-of-three and copyable-polymorphic warnings reported by clazy.
The default copy constructor and copy assignment operator are
only valid for simple classes so we delete them (i.e. make then not exist)
when we have either a virtual class or a destructor, the code still compiles
so this doesn't fix any bug, it is more a protection for when you think you
can copy a class and don't realize the default copy constrcutor is not doing
what you want and you get crashes. Hopefully this helps us in the future :)
Diffstat (limited to 'poppler/CairoOutputDev.h')
-rw-r--r-- | poppler/CairoOutputDev.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h index 83ed1abf..451fa789 100644 --- a/poppler/CairoOutputDev.h +++ b/poppler/CairoOutputDev.h @@ -23,6 +23,7 @@ // Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag@alfa.de> // Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> // Copyright (C) 2016 Jason Crain <jason@aquaticape.us> +// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -63,6 +64,9 @@ public: // Destructor. ~CairoImage (); + CairoImage(const CairoImage &) = delete; + CairoImage& operator=(const CairoImage &) = delete; + // Set the image cairo surface void setImage (cairo_surface_t *image); |