2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-23 03:18:59 +00:00

Use deleted copy/assignment (C++11)

This commit is contained in:
Jay Berkenbilt 2020-04-03 12:04:54 -04:00
parent 5806e5c60c
commit a6f1f829db
6 changed files with 12 additions and 13 deletions

View File

@ -63,8 +63,8 @@ class ClosedFileInputSource: public InputSource
void stayOpen(bool);
private:
ClosedFileInputSource(ClosedFileInputSource const&);
ClosedFileInputSource& operator=(ClosedFileInputSource const&);
ClosedFileInputSource(ClosedFileInputSource const&) = delete;
ClosedFileInputSource& operator=(ClosedFileInputSource const&) = delete;
void before();
void after();

View File

@ -51,8 +51,8 @@ class FileInputSource: public InputSource
virtual void unreadCh(char ch);
private:
FileInputSource(FileInputSource const&);
FileInputSource& operator=(FileInputSource const&);
FileInputSource(FileInputSource const&) = delete;
FileInputSource& operator=(FileInputSource const&) = delete;
class Members
{

View File

@ -78,8 +78,8 @@ class PointerHolder
bool array;
int refcount;
private:
Data(Data const&);
Data& operator=(Data const&);
Data(Data const&) = delete;
Data& operator=(Data const&) = delete;
};
public:

View File

@ -393,8 +393,8 @@ class QPDF
std::string const& Perms);
private:
EncryptionData(EncryptionData const&);
EncryptionData& operator=(EncryptionData const&);
EncryptionData(EncryptionData const&) = delete;
EncryptionData& operator=(EncryptionData const&) = delete;
int V;
int R;

View File

@ -183,9 +183,8 @@ class QPDFTokenizer
void expectInlineImage(PointerHolder<InputSource> input);
private:
// Do not implement copy or assignment
QPDFTokenizer(QPDFTokenizer const&);
QPDFTokenizer& operator=(QPDFTokenizer const&);
QPDFTokenizer(QPDFTokenizer const&) = delete;
QPDFTokenizer& operator=(QPDFTokenizer const&) = delete;
void resolveLiteral();
bool isSpace(char);

View File

@ -39,8 +39,8 @@ class QPDF_DLL_CLASS RandomDataProvider
}
private:
RandomDataProvider(RandomDataProvider const&);
RandomDataProvider& operator=(RandomDataProvider const&);
RandomDataProvider(RandomDataProvider const&) = delete;
RandomDataProvider& operator=(RandomDataProvider const&) = delete;
};
#endif // RANDOMDATAPROVIDER_HH