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); void stayOpen(bool);
private: private:
ClosedFileInputSource(ClosedFileInputSource const&); ClosedFileInputSource(ClosedFileInputSource const&) = delete;
ClosedFileInputSource& operator=(ClosedFileInputSource const&); ClosedFileInputSource& operator=(ClosedFileInputSource const&) = delete;
void before(); void before();
void after(); void after();

View File

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

View File

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

View File

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

View File

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

View File

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