Commit 8794789a authored by Albert Astals Cid's avatar Albert Astals Cid

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 :)
parent 4c781434
/* /*
* Copyright (C) 2009-2011, Pino Toscano <pino@kde.org> * Copyright (C) 2009-2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -39,6 +40,9 @@ public: ...@@ -39,6 +40,9 @@ public:
initer(); initer();
~initer(); ~initer();
initer(const initer &) = delete;
initer& operator=(const initer &) = delete;
private: private:
static unsigned int count; static unsigned int count;
}; };
......
/* /*
* Copyright (C) 2009, 2011, Pino Toscano <pino@kde.org> * Copyright (C) 2009, 2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -30,6 +31,9 @@ public: ...@@ -30,6 +31,9 @@ public:
embedded_file_private(FileSpec *fs); embedded_file_private(FileSpec *fs);
~embedded_file_private(); ~embedded_file_private();
embedded_file_private(const embedded_file_private &) = delete;
embedded_file_private& operator=(const embedded_file_private &) = delete;
static embedded_file* create(FileSpec *fs); static embedded_file* create(FileSpec *fs);
FileSpec *file_spec; FileSpec *file_spec;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* Copyright (C) 2014, 2015 Hans-Peter Deifel <hpdeifel@gmx.de> * Copyright (C) 2014, 2015 Hans-Peter Deifel <hpdeifel@gmx.de>
* Copyright (C) 2015, Tamas Szekeres <szekerest@gmail.com> * Copyright (C) 2015, Tamas Szekeres <szekerest@gmail.com>
* Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com> * Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -47,6 +48,8 @@ struct MiniIconv ...@@ -47,6 +48,8 @@ struct MiniIconv
{} {}
~MiniIconv() ~MiniIconv()
{ if (is_valid()) iconv_close(i_); } { if (is_valid()) iconv_close(i_); }
MiniIconv(const MiniIconv &) = delete;
MiniIconv& operator=(const MiniIconv &) = delete;
bool is_valid() const bool is_valid() const
{ return i_ != (iconv_t)-1; } { return i_ != (iconv_t)-1; }
operator iconv_t() const operator iconv_t() const
......
/* /*
* Copyright (C) 2010, Pino Toscano <pino@kde.org> * Copyright (C) 2010, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -30,6 +31,9 @@ public: ...@@ -30,6 +31,9 @@ public:
image_private(int iwidth, int iheight, image::format_enum iformat); image_private(int iwidth, int iheight, image::format_enum iformat);
~image_private(); ~image_private();
image_private(const image_private &) = delete;
image_private& operator=(const image_private &) = delete;
static image_private *create_data(int width, int height, image::format_enum format); static image_private *create_data(int width, int height, image::format_enum format);
static image_private *create_data(char *data, int width, int height, image::format_enum format); static image_private *create_data(char *data, int width, int height, image::format_enum format);
......
/* /*
* Copyright (C) 2010-2011, Pino Toscano <pino@kde.org> * Copyright (C) 2010-2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> * Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
* Copyright (C) 2017, Albert Astals Cid <aacid@kde.org> * Copyright (C) 2017, 2018, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2017, Jeroen Ooms <jeroenooms@gmail.com> * Copyright (C) 2017, Jeroen Ooms <jeroenooms@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -49,6 +49,8 @@ struct FileCloser { ...@@ -49,6 +49,8 @@ struct FileCloser {
: f(ff) {} : f(ff) {}
inline ~FileCloser() inline ~FileCloser()
{ (void)close(); } { (void)close(); }
FileCloser(const FileCloser &) = delete;
FileCloser& operator=(const FileCloser &) = delete;
inline bool close() inline bool close()
{ if (f) { const int c = fclose(f); f = 0; return c == 0; } return true; } { if (f) { const int c = fclose(f); f = 0; return c == 0; } return true; }
......
/* /*
* Copyright (C) 2009, Pino Toscano <pino@kde.org> * Copyright (C) 2009, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -35,6 +36,9 @@ public: ...@@ -35,6 +36,9 @@ public:
page_private(document_private *doc, int index); page_private(document_private *doc, int index);
~page_private(); ~page_private();
page_private(const page_private &) = delete;
page_private& operator=(const page_private &) = delete;
document_private *doc; document_private *doc;
Page *page; Page *page;
int index; int index;
......
/* /*
* Copyright (C) 2009, Pino Toscano <pino@kde.org> * Copyright (C) 2009, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -49,6 +50,9 @@ public: ...@@ -49,6 +50,9 @@ public:
toc_item_private(); toc_item_private();
~toc_item_private(); ~toc_item_private();
toc_item_private(const toc_item_private &) = delete;
toc_item_private& operator=(const toc_item_private &) = delete;
void load(OutlineItem *item); void load(OutlineItem *item);
void load_children(GooList *items); void load_children(GooList *items);
......
...@@ -6,6 +6,20 @@ ...@@ -6,6 +6,20 @@
// //
//======================================================================== //========================================================================
//========================================================================
//
// Modified under the Poppler project - http://poppler.freedesktop.org
//
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// 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
//
//========================================================================
#ifndef FOFIBASE_H #ifndef FOFIBASE_H
#define FOFIBASE_H #define FOFIBASE_H
...@@ -25,6 +39,8 @@ typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len); ...@@ -25,6 +39,8 @@ typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len);
class FoFiBase { class FoFiBase {
public: public:
FoFiBase(const FoFiBase &) = delete;
FoFiBase& operator=(const FoFiBase &other) = delete;
virtual ~FoFiBase(); virtual ~FoFiBase();
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
// under GPL version 2 or later // under GPL version 2 or later
// //
// Copyright (C) 2013 Christoph Duelli <duelli@melosgmbh.de> // Copyright (C) 2013 Christoph Duelli <duelli@melosgmbh.de>
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
// //
// To see a description of the changes please see the Changelog file that // 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 // came with your tarball or type make ChangeLog if you are building from git
...@@ -36,6 +37,9 @@ namespace { // do not pollute global namespace ...@@ -36,6 +37,9 @@ namespace { // do not pollute global namespace
class Reader { class Reader {
public: public:
Reader() = default;
Reader(const Reader &) = delete;
Reader& operator=(const Reader &other) = delete;
virtual ~Reader() {} virtual ~Reader() {}
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
// //
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> // Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2013, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com> // Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com>
// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com> // Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com>
// Copyright (C) 2014 Peter Breitenlohner <peb@mppmu.mpg.de> // Copyright (C) 2014 Peter Breitenlohner <peb@mppmu.mpg.de>
...@@ -81,6 +81,9 @@ public: ...@@ -81,6 +81,9 @@ public:
MutexLocker(GooMutex *mutexA) : mutex(mutexA) { gLockMutex(mutex); } MutexLocker(GooMutex *mutexA) : mutex(mutexA) { gLockMutex(mutex); }
~MutexLocker() { gUnlockMutex(mutex); } ~MutexLocker() { gUnlockMutex(mutex); }
MutexLocker(const MutexLocker &) = delete;
MutexLocker& operator=(const MutexLocker &other) = delete;
private: private:
GooMutex *mutex; GooMutex *mutex;
}; };
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// This file is licensed under the GPLv2 or later // This file is licensed under the GPLv2 or later
// //
// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009, 2011, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Adrian Johnson <ajohnson@redneon.com> // Copyright (C) 2010 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com> // Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com>
// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de> // Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de>
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
class ImgWriter class ImgWriter
{ {
public: public:
ImgWriter() = default;
ImgWriter(const ImgWriter &) = delete;
ImgWriter& operator=(const ImgWriter &other) = delete;
virtual ~ImgWriter(); virtual ~ImgWriter();
virtual bool init(FILE *f, int width, int height, int hDPI, int vDPI) = 0; virtual bool init(FILE *f, int width, int height, int hDPI, int vDPI) = 0;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
// under GPL version 2 or later // under GPL version 2 or later
// //
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> // Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2009, 2011, 2012, 2017 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009, 2011, 2012, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> // Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com> // Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com>
// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> // Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com>
...@@ -137,6 +137,9 @@ extern Goffset GoffsetMax(); ...@@ -137,6 +137,9 @@ extern Goffset GoffsetMax();
class GooFile class GooFile
{ {
public: public:
GooFile(const GooFile &) = delete;
GooFile& operator=(const GooFile &other) = delete;
int read(char *buf, int n, Goffset offset) const; int read(char *buf, int n, Goffset offset) const;
Goffset size() const; Goffset size() const;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com> // Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
// Copyright (C) 2008 Pino Toscano <pino@kde.org> // Copyright (C) 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com> // Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
// Copyright (C) 2009-2011, 2013, 2016, 2017 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009-2011, 2013, 2016-2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> // Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2012, 2015 Tobias Koenig <tokoe@kdab.com> // Copyright (C) 2012, 2015 Tobias Koenig <tokoe@kdab.com>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
...@@ -105,6 +105,9 @@ public: ...@@ -105,6 +105,9 @@ public:
AnnotPath(AnnotCoord **coords, int coordLength); AnnotPath(AnnotCoord **coords, int coordLength);
~AnnotPath(); ~AnnotPath();
AnnotPath(const AnnotPath &) = delete;
AnnotPath& operator=(const AnnotPath &other) = delete;
double getX(int coord) const; double getX(int coord) const;
double getY(int coord) const; double getY(int coord) const;
AnnotCoord *getCoord(int coord) const; AnnotCoord *getCoord(int coord) const;
...@@ -126,6 +129,9 @@ public: ...@@ -126,6 +129,9 @@ public:
AnnotCalloutLine(double x1, double y1, double x2, double y2); AnnotCalloutLine(double x1, double y1, double x2, double y2);
virtual ~AnnotCalloutLine() { } virtual ~AnnotCalloutLine() { }
AnnotCalloutLine(const AnnotCalloutLine &) = delete;
AnnotCalloutLine& operator=(const AnnotCalloutLine &other) = delete;
double getX1() const { return coord1.getX(); } double getX1() const { return coord1.getX(); }
double getY1() const { return coord1.getY(); } double getY1() const { return coord1.getY(); }
double getX2() const { return coord2.getX(); } double getX2() const { return coord2.getX(); }
...@@ -195,6 +201,9 @@ public: ...@@ -195,6 +201,9 @@ public:
AnnotQuadrilaterals(AnnotQuadrilateral **quads, int quadsLength); AnnotQuadrilaterals(AnnotQuadrilateral **quads, int quadsLength);
~AnnotQuadrilaterals(); ~AnnotQuadrilaterals();
AnnotQuadrilaterals(const AnnotQuadrilaterals &) = delete;
AnnotQuadrilaterals& operator=(const AnnotQuadrilaterals &other) = delete;
double getX1(int quadrilateral); double getX1(int quadrilateral);
double getY1(int quadrilateral); double getY1(int quadrilateral);
double getX2(int quadrilateral); double getX2(int quadrilateral);
...@@ -231,6 +240,9 @@ public: ...@@ -231,6 +240,9 @@ public:
virtual ~AnnotBorder(); virtual ~AnnotBorder();
AnnotBorder(const AnnotBorder &) = delete;
AnnotBorder& operator=(const AnnotBorder &other) = delete;
virtual void setWidth(double new_width) { width = new_width; } virtual void setWidth(double new_width) { width = new_width; }
virtual AnnotBorderType getType() const = 0; virtual AnnotBorderType getType() const = 0;
...@@ -429,6 +441,9 @@ public: ...@@ -429,6 +441,9 @@ public:
AnnotAppearanceCharacs(Dict *dict); AnnotAppearanceCharacs(Dict *dict);
~AnnotAppearanceCharacs(); ~AnnotAppearanceCharacs();
AnnotAppearanceCharacs(const AnnotAppearanceCharacs &) = delete;
AnnotAppearanceCharacs& operator=(const AnnotAppearanceCharacs &) = delete;
int getRotation() { return rotation; } int getRotation() { return rotation; }
AnnotColor *getBorderColor() { return borderColor; } AnnotColor *getBorderColor() { return borderColor; }
AnnotColor *getBackColor() { return backColor; } AnnotColor *getBackColor() { return backColor; }
...@@ -1420,6 +1435,9 @@ public: ...@@ -1420,6 +1435,9 @@ public:
Params(Dict *dict); Params(Dict *dict);
~Params(); ~Params();
Params(const Params &) = delete;
Params& operator=(const Params &) = delete;
GooString* getFlashVars() const; GooString* getFlashVars() const;
private: private:
...@@ -1439,6 +1457,9 @@ public: ...@@ -1439,6 +1457,9 @@ public:
Instance(Dict *dict); Instance(Dict *dict);
~Instance(); ~Instance();
Instance(const Instance &) = delete;
Instance& operator=(const Instance &) = delete;
Type getType() const; Type getType() const;
Params* getParams() const; Params* getParams() const;
...@@ -1460,6 +1481,9 @@ public: ...@@ -1460,6 +1481,9 @@ public:
Configuration(Dict *dict); Configuration(Dict *dict);
~Configuration(); ~Configuration();
Configuration(const Configuration &) = delete;
Configuration& operator=(const Configuration &) = delete;
Type getType() const; Type getType() const;
GooString* getName() const; GooString* getName() const;
int getInstancesCount() const; int getInstancesCount() const;
...@@ -1480,6 +1504,9 @@ public: ...@@ -1480,6 +1504,9 @@ public:
Asset(); Asset();
~Asset(); ~Asset();
Asset(const Asset &) = delete;
Asset& operator=(const Asset &) = delete;
GooString* getName() const; GooString* getName() const;
Object* getFileSpec() const; Object* getFileSpec() const;
...@@ -1495,6 +1522,9 @@ public: ...@@ -1495,6 +1522,9 @@ public:
Content(Dict *dict); Content(Dict *dict);
~Content(); ~Content();
Content(const Content &) = delete;
Content& operator=(const Content &) = delete;
int getConfigurationsCount() const; int getConfigurationsCount() const;
Configuration* getConfiguration(int index) const; Configuration* getConfiguration(int index) const;
...@@ -1549,6 +1579,9 @@ public: ...@@ -1549,6 +1579,9 @@ public:
Settings(Dict *dict); Settings(Dict *dict);
~Settings(); ~Settings();
Settings(const Settings &) = delete;
Settings& operator=(const Settings &) = delete;
Activation* getActivation() const; Activation* getActivation() const;
Deactivation* getDeactivation() const; Deactivation* getDeactivation() const;
...@@ -1589,6 +1622,9 @@ public: ...@@ -1589,6 +1622,9 @@ public:
~Annots(); ~Annots();
Annots(const Annots &) = delete;
Annots& operator=(const Annots &) = delete;
// Iterate through list of annotations. // Iterate through list of annotations.
int getNumAnnots() { return nAnnots; } int getNumAnnots() { return nAnnots; }
Annot *getAnnot(int i) { return annots[i]; } Annot *getAnnot(int i) { return annots[i]; }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> // Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> // Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2017 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> // Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that
...@@ -50,6 +50,9 @@ public: ...@@ -50,6 +50,9 @@ public:
// Destructor. // Destructor.
~Array(); ~Array();
Array(const Array &) = delete;
Array& operator=(const Array &) = delete;
// Get number of elements. // Get number of elements.
int getLength() const { return length; } int getLength() const { return length; }
......
...@@ -6,6 +6,20 @@ ...@@ -6,6 +6,20 @@
// //
//======================================================================== //========================================================================
//========================================================================
//
// Modified under the Poppler project - http://poppler.freedesktop.org
//
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// 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
//
//========================================================================
#ifndef BUILTINFONT_H #ifndef BUILTINFONT_H
#define BUILTINFONT_H #define BUILTINFONT_H
...@@ -42,6 +56,10 @@ public: ...@@ -42,6 +56,10 @@ public:
BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA); BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA);
~BuiltinFontWidths(); ~BuiltinFontWidths();
BuiltinFontWidths(const BuiltinFontWidths &) = delete;
BuiltinFontWidths& operator=(const BuiltinFontWidths &) = delete;
GBool getWidth(const char *name, Gushort *width); GBool getWidth(const char *name, Gushort *width);
private: private:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// under GPL version 2 or later // under GPL version 2 or later
// //
// Copyright (C) 2008 Koji Otani <sho@bbr.jp> // Copyright (C) 2008 Koji Otani <sho@bbr.jp>
// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> // Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that
...@@ -71,6 +71,9 @@ public: ...@@ -71,6 +71,9 @@ public:
~CMap(); ~CMap();
CMap(const CMap &) = delete;
CMap& operator=(const CMap &) = delete;
void incRefCnt(); void incRefCnt();
void decRefCnt(); void decRefCnt();
...@@ -129,6 +132,9 @@ public: ...@@ -129,6 +132,9 @@ public:
CMapCache(); CMapCache();
~CMapCache(); ~CMapCache();
CMapCache(const CMapCache &) = delete;
CMapCache& operator=(const CMapCache &) = delete;
// Get the <cMapName> CMap for the specified character collection. // Get the <cMapName> CMap for the specified character collection.
// Increments its reference count; there will be one reference for // Increments its reference count; there will be one reference for
// the cache plus one for the caller of this function. // the cache plus one for the caller of this function.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// //
// Copyright 2009 Stefan Thomas <thomas@eload24.com> // Copyright 2009 Stefan Thomas <thomas@eload24.com>
// Copyright 2010 Hib Eris <hib@hiberis.nl> // Copyright 2010 Hib Eris <hib@hiberis.nl>
// Copyright 2010 Albert Astals Cid <aacid@kde.org> // Copyright 2010, 2018 Albert Astals Cid <aacid@kde.org>
// //
//======================================================================== //========================================================================
...@@ -47,6 +47,9 @@ public: ...@@ -47,6 +47,9 @@ public:
CachedFile(CachedFileLoader *cacheLoader, GooString *uri); CachedFile(CachedFileLoader *cacheLoader, GooString *uri);
CachedFile(const CachedFile &) = delete;
CachedFile& operator=(const CachedFile &) = delete;
Guint getLength() { return length; } Guint getLength() { return length; }
long int tell(); long int tell();
int seek(long int offset, int origin); int seek(long int offset, int origin);
...@@ -127,8 +130,12 @@ class CachedFileLoader { ...@@ -127,8 +130,12 @@ class CachedFileLoader {
public: public:
CachedFileLoader() = default;
virtual ~CachedFileLoader() {}; virtual ~CachedFileLoader() {};
CachedFileLoader(const CachedFileLoader &) = delete;
CachedFileLoader& operator=(const CachedFileLoader &) = delete;
// Initializes the file load. // Initializes the file load.
// Returns the length of the file. // Returns the length of the file.
// The caller is responsible for deleting uri and cachedFile. // The caller is responsible for deleting uri and cachedFile.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// under GPL version 2 or later // under GPL version 2 or later
// //
// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> // Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2005, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net> // Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
// Copyright (C) 2006, 2010 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright (C) 2006, 2010 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2008, 2017 Adrian Johnson <ajohnson@redneon.com> // Copyright (C) 2008, 2017 Adrian Johnson <ajohnson@redneon.com>
...@@ -51,6 +51,8 @@ public: ...@@ -51,6 +51,8 @@ public:
GBool substitute, GBool substitute,
GBool printing); GBool printing);
virtual ~CairoFont(); virtual ~CairoFont();
CairoFont(const CairoFont &) = delete;
CairoFont& operator=(const CairoFont &other) = delete;
virtual GBool matches(Ref &other, GBool printing); virtual GBool matches(Ref &other, GBool printing);
cairo_font_face_t *getFontFace(void); cairo_font_face_t *getFontFace(void);
...@@ -114,6 +116,8 @@ public: ...@@ -114,6 +116,8 @@ public:
// Create a font engine. // Create a font engine.
CairoFontEngine(FT_Library libA); CairoFontEngine(FT_Library libA);
~CairoFontEngine(); ~CairoFontEngine();
CairoFontEngine(const CairoFontEngine &) = delete;
CairoFontEngine& operator=(const CairoFontEngine &other) = delete;