From fcc4c6a92e028453842a870c9184699bdb81988e Mon Sep 17 00:00:00 2001 From: tomsons26 Date: Thu, 27 Jun 2024 14:54:18 +0300 Subject: [PATCH] Use delete on classes not meant to be copied --- common/b64pipe.h | 4 ++-- common/b64straw.h | 4 ++-- common/blowpipe.h | 4 ++-- common/blwstraw.h | 4 ++-- common/buffer.h | 4 ++-- common/ccfile.h | 4 ++-- common/cstraw.h | 4 ++-- common/lcwpipe.h | 4 ++-- common/lcwstraw.h | 4 ++-- common/pipe.h | 4 ++-- common/pkpipe.h | 4 ++-- common/pkstraw.h | 4 ++-- common/rndstraw.h | 4 ++-- common/search.h | 4 ++-- common/shapipe.h | 4 ++-- common/shastraw.h | 4 ++-- common/straw.h | 4 ++-- common/xpipe.h | 8 ++++---- common/xstraw.h | 8 ++++---- 19 files changed, 42 insertions(+), 42 deletions(-) diff --git a/common/b64pipe.h b/common/b64pipe.h index 17c6f7b2..fc250dae 100644 --- a/common/b64pipe.h +++ b/common/b64pipe.h @@ -85,8 +85,8 @@ class Base64Pipe : public Pipe /* ** Explicitly disable the copy constructor and the assignment operator. */ - Base64Pipe(Base64Pipe& rvalue); - Base64Pipe& operator=(Base64Pipe const& pipe); + Base64Pipe(Base64Pipe& rvalue) = delete; + Base64Pipe& operator=(Base64Pipe const& pipe) = delete; }; #endif diff --git a/common/b64straw.h b/common/b64straw.h index 30638656..79c83228 100644 --- a/common/b64straw.h +++ b/common/b64straw.h @@ -83,8 +83,8 @@ class Base64Straw : public Straw /* ** Explicitly disable the copy constructor and the assignment operator. */ - Base64Straw(Base64Straw& rvalue); - Base64Straw& operator=(Base64Straw const& pipe); + Base64Straw(Base64Straw& rvalue) = delete; + Base64Straw& operator=(Base64Straw const& pipe) = delete; }; #endif diff --git a/common/blowpipe.h b/common/blowpipe.h index 20f52b05..23869038 100644 --- a/common/blowpipe.h +++ b/common/blowpipe.h @@ -83,8 +83,8 @@ class BlowPipe : public Pipe int Counter; CryptControl Control; - BlowPipe(BlowPipe& rvalue); - BlowPipe& operator=(BlowPipe const& pipe); + BlowPipe(BlowPipe& rvalue) = delete; + BlowPipe& operator=(BlowPipe const& pipe) = delete; }; #endif diff --git a/common/blwstraw.h b/common/blwstraw.h index f9b28a36..0590550b 100644 --- a/common/blwstraw.h +++ b/common/blwstraw.h @@ -84,8 +84,8 @@ class BlowStraw : public Straw int Counter; CryptControl Control; - BlowStraw(BlowStraw& rvalue); - BlowStraw& operator=(BlowStraw const& straw); + BlowStraw(BlowStraw& rvalue) = delete; + BlowStraw& operator=(BlowStraw const& straw) = delete; }; #endif diff --git a/common/buffer.h b/common/buffer.h index 6a175f7b..fe992e14 100644 --- a/common/buffer.h +++ b/common/buffer.h @@ -80,8 +80,8 @@ class BufferClass /* could be copied and the associated buffer freed. If this were to */ /* gappen it could cause weird general protection fault. */ /*===================================================================*/ - BufferClass(BufferClass const&); - BufferClass& operator=(BufferClass const&); + BufferClass(BufferClass const&) = delete; + BufferClass& operator=(BufferClass const&) = delete; protected: void* Buffer; diff --git a/common/ccfile.h b/common/ccfile.h index c5e0c08b..a412a99f 100644 --- a/common/ccfile.h +++ b/common/ccfile.h @@ -101,8 +101,8 @@ class CCFileClass : public CDFileClass int Position; // Force these to never be invoked. - CCFileClass const& operator=(CCFileClass const& c); - CCFileClass(CCFileClass const&); + CCFileClass const& operator=(CCFileClass const& c) = delete; + CCFileClass(CCFileClass const&) = delete; }; #endif diff --git a/common/cstraw.h b/common/cstraw.h index 28aac3fe..9edf1a7f 100644 --- a/common/cstraw.h +++ b/common/cstraw.h @@ -70,8 +70,8 @@ class CacheStraw : public Straw { return (BufferPtr.Is_Valid()); } - CacheStraw(CacheStraw& rvalue); - CacheStraw& operator=(CacheStraw const& pipe); + CacheStraw(CacheStraw& rvalue) = delete; + CacheStraw& operator=(CacheStraw const& pipe) = delete; }; #endif diff --git a/common/lcwpipe.h b/common/lcwpipe.h index f7b9a097..a483e33f 100644 --- a/common/lcwpipe.h +++ b/common/lcwpipe.h @@ -94,8 +94,8 @@ class LCWPipe : public Pipe unsigned short UncompCount; // Bytes of uncompressed data it represents. } BlockHeader; - LCWPipe(LCWPipe& rvalue); - LCWPipe& operator=(LCWPipe const& pipe); + LCWPipe(LCWPipe& rvalue) = delete; + LCWPipe& operator=(LCWPipe const& pipe) = delete; }; #endif diff --git a/common/lcwstraw.h b/common/lcwstraw.h index 8ed2b166..20771d4d 100644 --- a/common/lcwstraw.h +++ b/common/lcwstraw.h @@ -94,8 +94,8 @@ class LCWStraw : public Straw unsigned short UncompCount; // Bytes of uncompressed data it represents. } BlockHeader; - LCWStraw(LCWStraw& rvalue); - LCWStraw& operator=(LCWStraw const& pipe); + LCWStraw(LCWStraw& rvalue) = delete; + LCWStraw& operator=(LCWStraw const& pipe) = delete; }; #endif diff --git a/common/pipe.h b/common/pipe.h index 1457f7d8..fee9991c 100644 --- a/common/pipe.h +++ b/common/pipe.h @@ -137,8 +137,8 @@ class Pipe /* ** Disable the copy constructor and assignment operator. */ - Pipe(Pipe& rvalue); - Pipe& operator=(Pipe const& pipe); + Pipe(Pipe& rvalue) = delete; + Pipe& operator=(Pipe const& pipe) = delete; }; #endif diff --git a/common/pkpipe.h b/common/pkpipe.h index f0f8f375..55629733 100644 --- a/common/pkpipe.h +++ b/common/pkpipe.h @@ -130,8 +130,8 @@ class PKPipe : public Pipe int Encrypted_Key_Length(void) const; int Plain_Key_Length(void) const; - PKPipe(PKPipe& rvalue); - PKPipe& operator=(PKPipe const& pipe); + PKPipe(PKPipe& rvalue) = delete; + PKPipe& operator=(PKPipe const& pipe) = delete; }; #endif diff --git a/common/pkstraw.h b/common/pkstraw.h index 97259f77..9c21b27e 100644 --- a/common/pkstraw.h +++ b/common/pkstraw.h @@ -120,8 +120,8 @@ class PKStraw : public Straw int Encrypted_Key_Length(void) const; int Plain_Key_Length(void) const; - PKStraw(PKStraw& rvalue); - PKStraw& operator=(PKStraw const& straw); + PKStraw(PKStraw& rvalue) = delete; + PKStraw& operator=(PKStraw const& straw) = delete; }; #endif diff --git a/common/rndstraw.h b/common/rndstraw.h index 7c134e00..09c10d80 100644 --- a/common/rndstraw.h +++ b/common/rndstraw.h @@ -79,8 +79,8 @@ class RandomStraw : public Straw void Scramble_Seed(void); - RandomStraw(RandomStraw& rvalue); - RandomStraw& operator=(RandomStraw const& pipe); + RandomStraw(RandomStraw& rvalue) = delete; + RandomStraw& operator=(RandomStraw const& pipe) = delete; }; #endif diff --git a/common/search.h b/common/search.h index 287c0e1d..53f0a1ab 100644 --- a/common/search.h +++ b/common/search.h @@ -151,8 +151,8 @@ template class IndexClass NodeElement const* Archive; //------------------------------------------------------------------------------------- - IndexClass(IndexClass const& rvalue); - IndexClass* operator=(IndexClass const& rvalue); + IndexClass(IndexClass const& rvalue) = delete; + IndexClass* operator=(IndexClass const& rvalue) = delete; /* ** Increase size of internal index table by amount specified. diff --git a/common/shapipe.h b/common/shapipe.h index 69791f37..b5b09ace 100644 --- a/common/shapipe.h +++ b/common/shapipe.h @@ -57,8 +57,8 @@ class SHAPipe : public Pipe SHAEngine SHA; private: - SHAPipe(SHAPipe& rvalue); - SHAPipe& operator=(SHAPipe const& pipe); + SHAPipe(SHAPipe& rvalue) = delete; + SHAPipe& operator=(SHAPipe const& pipe) = delete; }; #endif diff --git a/common/shastraw.h b/common/shastraw.h index cfe86678..d0bcef28 100644 --- a/common/shastraw.h +++ b/common/shastraw.h @@ -57,8 +57,8 @@ class SHAStraw : public Straw SHAEngine SHA; private: - SHAStraw(SHAStraw& rvalue); - SHAStraw& operator=(SHAStraw const& straw); + SHAStraw(SHAStraw& rvalue) = delete; + SHAStraw& operator=(SHAStraw const& straw) = delete; }; #endif diff --git a/common/straw.h b/common/straw.h index 7e61e036..2606ea20 100644 --- a/common/straw.h +++ b/common/straw.h @@ -147,8 +147,8 @@ class Straw /* ** Disable the copy constructor and assignment operator. */ - Straw(Straw& rvalue); - Straw& operator=(Straw const& pipe); + Straw(Straw& rvalue) = delete; + Straw& operator=(Straw const& pipe) = delete; }; #endif diff --git a/common/xpipe.h b/common/xpipe.h index 5d56ed20..b5ae61b9 100644 --- a/common/xpipe.h +++ b/common/xpipe.h @@ -70,8 +70,8 @@ class BufferPipe : public Pipe { return (BufferPtr.Is_Valid()); } - BufferPipe(BufferPipe& rvalue); - BufferPipe& operator=(BufferPipe const& pipe); + BufferPipe(BufferPipe& rvalue) = delete; + BufferPipe& operator=(BufferPipe const& pipe) = delete; }; /* @@ -105,8 +105,8 @@ class FilePipe : public Pipe { return (File != NULL); } - FilePipe(FilePipe& rvalue); - FilePipe& operator=(FilePipe const& pipe); + FilePipe(FilePipe& rvalue) = delete; + FilePipe& operator=(FilePipe const& pipe) = delete; }; #endif diff --git a/common/xstraw.h b/common/xstraw.h index e77a438d..d9653a5a 100644 --- a/common/xstraw.h +++ b/common/xstraw.h @@ -69,8 +69,8 @@ class BufferStraw : public Straw { return (BufferPtr.Is_Valid()); } - BufferStraw(BufferStraw& rvalue); - BufferStraw& operator=(BufferStraw const& pipe); + BufferStraw(BufferStraw& rvalue) = delete; + BufferStraw& operator=(BufferStraw const& pipe) = delete; }; /* @@ -101,8 +101,8 @@ class FileStraw : public Straw { return (File != NULL); } - FileStraw(FileStraw& rvalue); - FileStraw& operator=(FileStraw const& pipe); + FileStraw(FileStraw& rvalue) = delete; + FileStraw& operator=(FileStraw const& pipe) = delete; }; #endif