Commit a6f1f829dbad51ef0a6a5d9262e5c49e32dba45a
1 parent
5806e5c6
Use deleted copy/assignment (C++11)
Showing
6 changed files
with
12 additions
and
13 deletions
include/qpdf/ClosedFileInputSource.hh
| ... | ... | @@ -63,8 +63,8 @@ class ClosedFileInputSource: public InputSource |
| 63 | 63 | void stayOpen(bool); |
| 64 | 64 | |
| 65 | 65 | private: |
| 66 | - ClosedFileInputSource(ClosedFileInputSource const&); | |
| 67 | - ClosedFileInputSource& operator=(ClosedFileInputSource const&); | |
| 66 | + ClosedFileInputSource(ClosedFileInputSource const&) = delete; | |
| 67 | + ClosedFileInputSource& operator=(ClosedFileInputSource const&) = delete; | |
| 68 | 68 | |
| 69 | 69 | void before(); |
| 70 | 70 | void after(); | ... | ... |
include/qpdf/FileInputSource.hh
| ... | ... | @@ -51,8 +51,8 @@ class FileInputSource: public InputSource |
| 51 | 51 | virtual void unreadCh(char ch); |
| 52 | 52 | |
| 53 | 53 | private: |
| 54 | - FileInputSource(FileInputSource const&); | |
| 55 | - FileInputSource& operator=(FileInputSource const&); | |
| 54 | + FileInputSource(FileInputSource const&) = delete; | |
| 55 | + FileInputSource& operator=(FileInputSource const&) = delete; | |
| 56 | 56 | |
| 57 | 57 | class Members |
| 58 | 58 | { | ... | ... |
include/qpdf/PointerHolder.hh
include/qpdf/QPDF.hh
| ... | ... | @@ -393,8 +393,8 @@ class QPDF |
| 393 | 393 | std::string const& Perms); |
| 394 | 394 | |
| 395 | 395 | private: |
| 396 | - EncryptionData(EncryptionData const&); | |
| 397 | - EncryptionData& operator=(EncryptionData const&); | |
| 396 | + EncryptionData(EncryptionData const&) = delete; | |
| 397 | + EncryptionData& operator=(EncryptionData const&) = delete; | |
| 398 | 398 | |
| 399 | 399 | int V; |
| 400 | 400 | int R; | ... | ... |
include/qpdf/QPDFTokenizer.hh
| ... | ... | @@ -183,9 +183,8 @@ class QPDFTokenizer |
| 183 | 183 | void expectInlineImage(PointerHolder<InputSource> input); |
| 184 | 184 | |
| 185 | 185 | private: |
| 186 | - // Do not implement copy or assignment | |
| 187 | - QPDFTokenizer(QPDFTokenizer const&); | |
| 188 | - QPDFTokenizer& operator=(QPDFTokenizer const&); | |
| 186 | + QPDFTokenizer(QPDFTokenizer const&) = delete; | |
| 187 | + QPDFTokenizer& operator=(QPDFTokenizer const&) = delete; | |
| 189 | 188 | |
| 190 | 189 | void resolveLiteral(); |
| 191 | 190 | bool isSpace(char); | ... | ... |
include/qpdf/RandomDataProvider.hh
| ... | ... | @@ -39,8 +39,8 @@ class QPDF_DLL_CLASS RandomDataProvider |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | private: |
| 42 | - RandomDataProvider(RandomDataProvider const&); | |
| 43 | - RandomDataProvider& operator=(RandomDataProvider const&); | |
| 42 | + RandomDataProvider(RandomDataProvider const&) = delete; | |
| 43 | + RandomDataProvider& operator=(RandomDataProvider const&) = delete; | |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | 46 | #endif // RANDOMDATAPROVIDER_HH | ... | ... |