Commit a6f1f829dbad51ef0a6a5d9262e5c49e32dba45a

Authored by Jay Berkenbilt
1 parent 5806e5c6

Use deleted copy/assignment (C++11)

include/qpdf/ClosedFileInputSource.hh
@@ -63,8 +63,8 @@ class ClosedFileInputSource: public InputSource @@ -63,8 +63,8 @@ class ClosedFileInputSource: public InputSource
63 void stayOpen(bool); 63 void stayOpen(bool);
64 64
65 private: 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 void before(); 69 void before();
70 void after(); 70 void after();
include/qpdf/FileInputSource.hh
@@ -51,8 +51,8 @@ class FileInputSource: public InputSource @@ -51,8 +51,8 @@ class FileInputSource: public InputSource
51 virtual void unreadCh(char ch); 51 virtual void unreadCh(char ch);
52 52
53 private: 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 class Members 57 class Members
58 { 58 {
include/qpdf/PointerHolder.hh
@@ -78,8 +78,8 @@ class PointerHolder @@ -78,8 +78,8 @@ class PointerHolder
78 bool array; 78 bool array;
79 int refcount; 79 int refcount;
80 private: 80 private:
81 - Data(Data const&);  
82 - Data& operator=(Data const&); 81 + Data(Data const&) = delete;
  82 + Data& operator=(Data const&) = delete;
83 }; 83 };
84 84
85 public: 85 public:
include/qpdf/QPDF.hh
@@ -393,8 +393,8 @@ class QPDF @@ -393,8 +393,8 @@ class QPDF
393 std::string const& Perms); 393 std::string const& Perms);
394 394
395 private: 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 int V; 399 int V;
400 int R; 400 int R;
include/qpdf/QPDFTokenizer.hh
@@ -183,9 +183,8 @@ class QPDFTokenizer @@ -183,9 +183,8 @@ class QPDFTokenizer
183 void expectInlineImage(PointerHolder<InputSource> input); 183 void expectInlineImage(PointerHolder<InputSource> input);
184 184
185 private: 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 void resolveLiteral(); 189 void resolveLiteral();
191 bool isSpace(char); 190 bool isSpace(char);
include/qpdf/RandomDataProvider.hh
@@ -39,8 +39,8 @@ class QPDF_DLL_CLASS RandomDataProvider @@ -39,8 +39,8 @@ class QPDF_DLL_CLASS RandomDataProvider
39 } 39 }
40 40
41 private: 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 #endif // RANDOMDATAPROVIDER_HH 46 #endif // RANDOMDATAPROVIDER_HH