From 0d8e16d5c824cce5b538c432f8f95b193c6ed560 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Wed, 7 Nov 2007 23:13:20 +0100 Subject: [PATCH] Rename nocopy to noncopyable. --- src/conf.h | 10 ++++++---- src/linker.h | 8 ++++---- src/pefile.h | 8 ++++---- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/conf.h b/src/conf.h index 403c2cca..91bec926 100644 --- a/src/conf.h +++ b/src/conf.h @@ -379,12 +379,14 @@ inline unsigned UPX_MIN(unsigned a, unsigned b) { return a < b ? a : b; } #define ByteArray(var, size) Array(unsigned char, var, size) -struct nocopy +struct noncopyable { - inline nocopy() {} +protected: + inline noncopyable() {} + inline ~noncopyable() {} private: - nocopy(const nocopy &); // undefined - nocopy& operator=(const nocopy &); // undefined + noncopyable(const noncopyable &); // undefined + const noncopyable& operator=(const noncopyable &); // undefined }; diff --git a/src/linker.h b/src/linker.h index 22dca7e4..dbeda4d5 100644 --- a/src/linker.h +++ b/src/linker.h @@ -34,7 +34,7 @@ // ElfLinker **************************************************************************/ -class ElfLinker : private nocopy +class ElfLinker : private noncopyable { friend class Packer; public: @@ -110,7 +110,7 @@ protected: }; -struct ElfLinker::Section : private nocopy +struct ElfLinker::Section : private noncopyable { char *name; void *input; @@ -125,7 +125,7 @@ struct ElfLinker::Section : private nocopy }; -struct ElfLinker::Symbol : private nocopy +struct ElfLinker::Symbol : private noncopyable { char *name; Section *section; @@ -136,7 +136,7 @@ struct ElfLinker::Symbol : private nocopy }; -struct ElfLinker::Relocation : private nocopy +struct ElfLinker::Relocation : private noncopyable { const Section *section; unsigned offset; diff --git a/src/pefile.h b/src/pefile.h index 340a139d..ba722303 100644 --- a/src/pefile.h +++ b/src/pefile.h @@ -229,7 +229,7 @@ protected: RT_MANIFEST, RT_LAST }; - class Interval : private nocopy + class Interval : private noncopyable { unsigned capacity; void *base; @@ -257,7 +257,7 @@ protected: static int __acc_cdecl_qsort compare(const void *p1,const void *p2); }; - class Reloc : private nocopy + class Reloc : private noncopyable { upx_byte *start; unsigned size; @@ -280,7 +280,7 @@ protected: void finish(upx_byte *&p,unsigned &size); }; - class Resource : private nocopy + class Resource : private noncopyable { struct res_dir_entry; struct res_dir; @@ -331,7 +331,7 @@ protected: */ }; - class Export : private nocopy + class Export : private noncopyable { struct export_dir_t {