From d6f0006c0b12c74df2d93170262a017f15949320 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Sun, 23 Apr 2017 22:50:47 +0200 Subject: Use CM_DISABLE_COPY --- Source/CursesDialog/cmCursesBoolWidget.h | 6 ++---- Source/CursesDialog/cmCursesCacheEntryComposite.cxx | 1 - Source/CursesDialog/cmCursesCacheEntryComposite.h | 7 +++---- Source/CursesDialog/cmCursesDummyWidget.h | 6 ++---- Source/CursesDialog/cmCursesFilePathWidget.h | 8 +++----- Source/CursesDialog/cmCursesForm.cxx | 2 -- Source/CursesDialog/cmCursesForm.h | 7 +++---- Source/CursesDialog/cmCursesLabelWidget.h | 6 ++---- Source/CursesDialog/cmCursesLongMessageForm.h | 5 ++--- Source/CursesDialog/cmCursesMainForm.h | 5 ++--- Source/CursesDialog/cmCursesOptionsWidget.h | 4 ++-- Source/CursesDialog/cmCursesPathWidget.h | 5 ++--- Source/CursesDialog/cmCursesStringWidget.h | 5 ++--- Source/CursesDialog/cmCursesWidget.cxx | 2 -- Source/CursesDialog/cmCursesWidget.h | 7 +++---- Source/cmCLocaleEnvironmentScope.h | 7 +++---- Source/cmCPackPropertiesGenerator.h | 4 +++- Source/cmCommand.h | 6 ++---- Source/cmCommandArgumentParserHelper.cxx | 1 - Source/cmCommandArgumentParserHelper.h | 8 +++----- Source/cmCryptoHash.h | 7 +++---- Source/cmDepends.h | 6 ++---- Source/cmDependsC.h | 6 ++---- Source/cmDependsFortran.h | 5 ++--- Source/cmDependsJava.h | 6 ++---- Source/cmDynamicLoader.cxx | 2 -- Source/cmDynamicLoader.h | 8 +++----- Source/cmFileLock.h | 7 +++---- Source/cmFileLockPool.h | 12 +++++------- Source/cmGeneratorExpression.h | 10 ++++------ Source/cmGeneratorExpressionEvaluator.h | 3 +-- Source/cmGeneratorTarget.h | 5 ++--- Source/cmInstallGenerator.h | 2 ++ Source/cmLinkLineComputer.h | 7 +++---- Source/cmLinkLineDeviceComputer.h | 4 ++++ Source/cmLocale.h | 5 ++--- Source/cmMSVC60LinkLineComputer.h | 2 ++ Source/cmMakefile.h | 8 +++----- Source/cmNinjaLinkLineComputer.h | 2 ++ Source/cmScriptGenerator.cxx | 2 -- Source/cmScriptGenerator.h | 7 +++---- Source/cmSystemTools.h | 6 ++---- Source/cmTestGenerator.h | 4 +++- Source/cmXMLWriter.h | 7 +++---- Source/cmake.h | 4 ++-- 45 files changed, 99 insertions(+), 140 deletions(-) diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index 45f01aa..90bcc22 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -12,6 +12,8 @@ class cmCursesMainForm; class cmCursesBoolWidget : public cmCursesWidget { + CM_DISABLE_COPY(cmCursesBoolWidget) + public: cmCursesBoolWidget(int width, int height, int left, int top); @@ -25,10 +27,6 @@ public: // Set/Get the value (on/off). void SetValueAsBool(bool value); bool GetValueAsBool(); - -protected: - cmCursesBoolWidget(const cmCursesBoolWidget& from); - void operator=(const cmCursesBoolWidget&); }; #endif // cmCursesBoolWidget_h diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index cdde1a3..d071c91 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -14,7 +14,6 @@ #include "cmSystemTools.h" #include "cmake.h" -#include "cmConfigure.h" #include #include diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h index 1dbcfa4..3c50078 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.h +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -3,7 +3,7 @@ #ifndef cmCursesCacheEntryComposite_h #define cmCursesCacheEntryComposite_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include @@ -13,6 +13,8 @@ class cmake; class cmCursesCacheEntryComposite { + CM_DISABLE_COPY(cmCursesCacheEntryComposite) + public: cmCursesCacheEntryComposite(const std::string& key, int labelwidth, int entrywidth); @@ -24,9 +26,6 @@ public: friend class cmCursesMainForm; protected: - cmCursesCacheEntryComposite(const cmCursesCacheEntryComposite& from); - void operator=(const cmCursesCacheEntryComposite&); - cmCursesLabelWidget* Label; cmCursesLabelWidget* IsNewLabel; cmCursesWidget* Entry; diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index 0381f25..d9bb6ba 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -12,6 +12,8 @@ class cmCursesMainForm; class cmCursesDummyWidget : public cmCursesWidget { + CM_DISABLE_COPY(cmCursesDummyWidget) + public: cmCursesDummyWidget(int width, int height, int left, int top); @@ -20,10 +22,6 @@ public: // when this widget has focus. Returns true if the input was // handled. bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; - -protected: - cmCursesDummyWidget(const cmCursesDummyWidget& from); - void operator=(const cmCursesDummyWidget&); }; #endif // cmCursesDummyWidget_h diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h index b4c04cb..6ad535b 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.h +++ b/Source/CursesDialog/cmCursesFilePathWidget.h @@ -3,18 +3,16 @@ #ifndef cmCursesFilePathWidget_h #define cmCursesFilePathWidget_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include "cmCursesPathWidget.h" class cmCursesFilePathWidget : public cmCursesPathWidget { + CM_DISABLE_COPY(cmCursesFilePathWidget) + public: cmCursesFilePathWidget(int width, int height, int left, int top); - -protected: - cmCursesFilePathWidget(const cmCursesFilePathWidget& from); - void operator=(const cmCursesFilePathWidget&); }; #endif // cmCursesFilePathWidget_h diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx index 12e5d75..06c1e9c 100644 --- a/Source/CursesDialog/cmCursesForm.cxx +++ b/Source/CursesDialog/cmCursesForm.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCursesForm.h" -#include "cmConfigure.h" - cmsys::ofstream cmCursesForm::DebugFile; bool cmCursesForm::Debug = false; diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h index 7eb94a8..553105c 100644 --- a/Source/CursesDialog/cmCursesForm.h +++ b/Source/CursesDialog/cmCursesForm.h @@ -3,7 +3,7 @@ #ifndef cmCursesForm_h #define cmCursesForm_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include "cmCursesStandardIncludes.h" @@ -11,6 +11,8 @@ class cmCursesForm { + CM_DISABLE_COPY(cmCursesForm) + public: cmCursesForm(); virtual ~cmCursesForm(); @@ -55,9 +57,6 @@ protected: static cmsys::ofstream DebugFile; static bool Debug; - cmCursesForm(const cmCursesForm& form); - void operator=(const cmCursesForm&); - FORM* Form; }; diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index a0de4c6..267de7c 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -14,6 +14,8 @@ class cmCursesMainForm; class cmCursesLabelWidget : public cmCursesWidget { + CM_DISABLE_COPY(cmCursesLabelWidget) + public: cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name); @@ -24,10 +26,6 @@ public: // when this widget has focus. Returns true if the input was // handled bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; - -protected: - cmCursesLabelWidget(const cmCursesLabelWidget& from); - void operator=(const cmCursesLabelWidget&); }; #endif // cmCursesLabelWidget_h diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index ab49c07..cd8e095 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -13,6 +13,8 @@ class cmCursesLongMessageForm : public cmCursesForm { + CM_DISABLE_COPY(cmCursesLongMessageForm) + public: cmCursesLongMessageForm(std::vector const& messages, const char* title); @@ -38,9 +40,6 @@ public: void UpdateStatusBar() CM_OVERRIDE; protected: - cmCursesLongMessageForm(const cmCursesLongMessageForm& from); - void operator=(const cmCursesLongMessageForm&); - std::string Messages; std::string Title; diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index b91211e..e35cf3e 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -23,6 +23,8 @@ class cmake; */ class cmCursesMainForm : public cmCursesForm { + CM_DISABLE_COPY(cmCursesMainForm) + public: cmCursesMainForm(std::vector const& args, int initwidth); ~cmCursesMainForm() CM_OVERRIDE; @@ -103,9 +105,6 @@ public: static void UpdateProgress(const char* msg, float prog, void*); protected: - cmCursesMainForm(const cmCursesMainForm& from); - void operator=(const cmCursesMainForm&); - // Copy the cache values from the user interface to the actual // cache. void FillCacheManagerFromUI(); diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h index 4b2e8b4..7f4416f 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.h +++ b/Source/CursesDialog/cmCursesOptionsWidget.h @@ -15,6 +15,8 @@ class cmCursesMainForm; class cmCursesOptionsWidget : public cmCursesWidget { + CM_DISABLE_COPY(cmCursesOptionsWidget) + public: cmCursesOptionsWidget(int width, int height, int left, int top); @@ -29,8 +31,6 @@ public: void PreviousOption(); protected: - cmCursesOptionsWidget(const cmCursesOptionsWidget& from); - void operator=(const cmCursesOptionsWidget&); std::vector Options; std::vector::size_type CurrentOption; }; diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h index 097eeca..ae6c16d 100644 --- a/Source/CursesDialog/cmCursesPathWidget.h +++ b/Source/CursesDialog/cmCursesPathWidget.h @@ -14,6 +14,8 @@ class cmCursesMainForm; class cmCursesPathWidget : public cmCursesStringWidget { + CM_DISABLE_COPY(cmCursesPathWidget) + public: cmCursesPathWidget(int width, int height, int left, int top); @@ -26,9 +28,6 @@ public: void OnType(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; protected: - cmCursesPathWidget(const cmCursesPathWidget& from); - void operator=(const cmCursesPathWidget&); - std::string LastString; std::string LastGlob; bool Cycle; diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index c07bfce..5eb3366 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -20,6 +20,8 @@ class cmCursesMainForm; class cmCursesStringWidget : public cmCursesWidget { + CM_DISABLE_COPY(cmCursesStringWidget) + public: cmCursesStringWidget(int width, int height, int left, int top); @@ -60,9 +62,6 @@ public: bool PrintKeys() CM_OVERRIDE; protected: - cmCursesStringWidget(const cmCursesStringWidget& from); - void operator=(const cmCursesStringWidget&); - // true if the widget is in edit mode bool InEdit; char* OriginalString; diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx index 229a050..054f27e 100644 --- a/Source/CursesDialog/cmCursesWidget.cxx +++ b/Source/CursesDialog/cmCursesWidget.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCursesWidget.h" -#include "cmConfigure.h" - cmCursesWidget::cmCursesWidget(int width, int height, int left, int top) { this->Field = new_field(height, width, top, left, 0, 0); diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index 5ce8a75..3470d70 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesWidget_h #define cmCursesWidget_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include "cmCursesStandardIncludes.h" #include "cmStateTypes.h" @@ -14,6 +14,8 @@ class cmCursesMainForm; class cmCursesWidget { + CM_DISABLE_COPY(cmCursesWidget) + public: cmCursesWidget(int width, int height, int left, int top); virtual ~cmCursesWidget(); @@ -59,9 +61,6 @@ public: friend class cmCursesMainForm; protected: - cmCursesWidget(const cmCursesWidget& from); - void operator=(const cmCursesWidget&); - cmStateEnums::CacheEntryType Type; std::string Value; FIELD* Field; diff --git a/Source/cmCLocaleEnvironmentScope.h b/Source/cmCLocaleEnvironmentScope.h index 1e7c42a..e956cb2 100644 --- a/Source/cmCLocaleEnvironmentScope.h +++ b/Source/cmCLocaleEnvironmentScope.h @@ -3,21 +3,20 @@ #ifndef cmCLocaleEnvironmentScope_h #define cmCLocaleEnvironmentScope_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include #include class cmCLocaleEnvironmentScope { + CM_DISABLE_COPY(cmCLocaleEnvironmentScope) + public: cmCLocaleEnvironmentScope(); ~cmCLocaleEnvironmentScope(); private: - cmCLocaleEnvironmentScope(cmCLocaleEnvironmentScope const&); - cmCLocaleEnvironmentScope& operator=(cmCLocaleEnvironmentScope const&); - std::string GetEnv(std::string const& key); void SetEnv(std::string const& key, std::string const& value); diff --git a/Source/cmCPackPropertiesGenerator.h b/Source/cmCPackPropertiesGenerator.h index 107ccf9..48f4c10 100644 --- a/Source/cmCPackPropertiesGenerator.h +++ b/Source/cmCPackPropertiesGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackPropertiesGenerator_h #define cmCPackPropertiesGenerator_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include "cmScriptGenerator.h" @@ -20,6 +20,8 @@ class cmLocalGenerator; */ class cmCPackPropertiesGenerator : public cmScriptGenerator { + CM_DISABLE_COPY(cmCPackPropertiesGenerator) + public: cmCPackPropertiesGenerator(cmLocalGenerator* lg, cmInstalledFile const& installedFile, diff --git a/Source/cmCommand.h b/Source/cmCommand.h index f4a75d5..62eced0 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -24,6 +24,8 @@ struct cmListFileArgument; */ class cmCommand { + CM_DISABLE_COPY(cmCommand) + public: /** * Construct the command. By default it has no makefile. @@ -103,10 +105,6 @@ public: */ void SetError(const std::string& e); -private: - cmCommand(cmCommand const&); // = delete; - cmCommand& operator=(cmCommand const&); // = delete; - protected: cmMakefile* Makefile; diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 153efc4..4eb4531 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -8,7 +8,6 @@ #include "cmSystemTools.h" #include "cmake.h" -#include "cmConfigure.h" #include #include #include diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index c0c1cd9..465ca9e 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -3,7 +3,7 @@ #ifndef cmCommandArgumentParserHelper_h #define cmCommandArgumentParserHelper_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include #include @@ -12,6 +12,8 @@ class cmMakefile; class cmCommandArgumentParserHelper { + CM_DISABLE_COPY(cmCommandArgumentParserHelper) + public: struct ParserType { @@ -60,10 +62,6 @@ public: char BSLASHVariable[3]; private: - cmCommandArgumentParserHelper(cmCommandArgumentParserHelper const&); - cmCommandArgumentParserHelper& operator=( - cmCommandArgumentParserHelper const&); - std::string::size_type InputBufferPos; std::string InputBuffer; std::vector OutputBuffer; diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index ac92c48..c380d85 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -3,7 +3,7 @@ #ifndef cmCryptoHash_h #define cmCryptoHash_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include #include @@ -16,6 +16,8 @@ */ class cmCryptoHash { + CM_DISABLE_COPY(cmCryptoHash) + public: enum Algo { @@ -78,9 +80,6 @@ public: std::string FinalizeHex(); private: - cmCryptoHash(cmCryptoHash const&); - cmCryptoHash& operator=(cmCryptoHash const&); - unsigned int Id; struct rhash_context* CTX; }; diff --git a/Source/cmDepends.h b/Source/cmDepends.h index a80b585..b33feb9 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -24,6 +24,8 @@ class cmLocalGenerator; */ class cmDepends { + CM_DISABLE_COPY(cmDepends) + public: /** Instances need to know the build directory name and the relative path from the build directory to the target file. */ @@ -116,10 +118,6 @@ protected: std::vector IncludePath; void SetIncludePathFromLanguage(const std::string& lang); - -private: - cmDepends(cmDepends const&); // Purposely not implemented. - void operator=(cmDepends const&); // Purposely not implemented. }; #endif diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h index 4f52826..250d40f 100644 --- a/Source/cmDependsC.h +++ b/Source/cmDependsC.h @@ -22,6 +22,8 @@ class cmLocalGenerator; */ class cmDependsC : public cmDepends { + CM_DISABLE_COPY(cmDependsC) + public: /** Checking instances need to know the build directory name and the relative path from the build directory to the target file. */ @@ -93,10 +95,6 @@ protected: void WriteCacheFile() const; void ReadCacheFile(); - -private: - cmDependsC(cmDependsC const&); // Purposely not implemented. - void operator=(cmDependsC const&); // Purposely not implemented. }; #endif diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index a9a1ed3..ec208af 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -21,6 +21,8 @@ class cmLocalGenerator; */ class cmDependsFortran : public cmDepends { + CM_DISABLE_COPY(cmDependsFortran) + public: /** Checking instances need to know the build directory name and the relative path from the build directory to the target file. */ @@ -77,9 +79,6 @@ protected: cmDependsFortranInternals* Internal; private: - cmDependsFortran(cmDependsFortran const&); // Purposely not implemented. - void operator=(cmDependsFortran const&); // Purposely not implemented. - std::string MaybeConvertToRelativePath(std::string const& base, std::string const& path); }; diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h index 6efa51a..a07bf09 100644 --- a/Source/cmDependsJava.h +++ b/Source/cmDependsJava.h @@ -17,6 +17,8 @@ */ class cmDependsJava : public cmDepends { + CM_DISABLE_COPY(cmDependsJava) + public: /** Checking instances need to know the build directory name and the relative path from the build directory to the target file. */ @@ -33,10 +35,6 @@ protected: bool CheckDependencies( std::istream& internalDepends, const char* internalDependsFileName, std::map& validDeps) CM_OVERRIDE; - -private: - cmDependsJava(cmDependsJava const&); // Purposely not implemented. - void operator=(cmDependsJava const&); // Purposely not implemented. }; #endif diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index 76a4a29..f530ba7 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDynamicLoader.h" -#include "cmConfigure.h" - #include #include #include diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index dd69b40..7c46dd5 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -8,12 +8,14 @@ #ifndef cmDynamicLoader_h #define cmDynamicLoader_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include "cmsys/DynamicLoader.hxx" // IWYU pragma: export class cmDynamicLoader { + CM_DISABLE_COPY(cmDynamicLoader) + public: // Description: // Load a dynamic library into the current process. @@ -28,10 +30,6 @@ public: protected: cmDynamicLoader() {} ~cmDynamicLoader() {} - -private: - cmDynamicLoader(const cmDynamicLoader&); // Not implemented. - void operator=(const cmDynamicLoader&); // Not implemented. }; #endif diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index 8f996cf..ccef508 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -3,7 +3,7 @@ #ifndef cmFileLock_h #define cmFileLock_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include @@ -21,6 +21,8 @@ class cmFileLockResult; */ class cmFileLock { + CM_DISABLE_COPY(cmFileLock) + public: cmFileLock(); ~cmFileLock(); @@ -44,9 +46,6 @@ public: bool IsLocked(const std::string& filename) const; private: - cmFileLock(const cmFileLock&); - cmFileLock& operator=(const cmFileLock&); - cmFileLockResult OpenFile(); cmFileLockResult LockWithoutTimeout(); cmFileLockResult LockWithTimeout(unsigned long timeoutSec); diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index 09c984c..689ddd7 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -3,7 +3,7 @@ #ifndef cmFileLockPool_h #define cmFileLockPool_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include #include @@ -13,6 +13,8 @@ class cmFileLockResult; class cmFileLockPool { + CM_DISABLE_COPY(cmFileLockPool) + public: cmFileLockPool(); ~cmFileLockPool(); @@ -52,13 +54,12 @@ public: cmFileLockResult Release(const std::string& filename); private: - cmFileLockPool(const cmFileLockPool&); - cmFileLockPool& operator=(const cmFileLockPool&); - bool IsAlreadyLocked(const std::string& filename) const; class ScopePool { + CM_DISABLE_COPY(ScopePool) + public: ScopePool(); ~ScopePool(); @@ -69,9 +70,6 @@ private: bool IsAlreadyLocked(const std::string& filename) const; private: - ScopePool(const ScopePool&); - ScopePool& operator=(const ScopePool&); - typedef std::list List; typedef List::iterator It; typedef List::const_iterator CIt; diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 694ce8a..34516f5 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -31,6 +31,8 @@ struct cmGeneratorExpressionEvaluator; */ class cmGeneratorExpression { + CM_DISABLE_COPY(cmGeneratorExpression) + public: /** Construct. */ cmGeneratorExpression( @@ -61,14 +63,13 @@ public: static std::string StripEmptyListElements(const std::string& input); private: - cmGeneratorExpression(const cmGeneratorExpression&); - void operator=(const cmGeneratorExpression&); - cmListFileBacktrace Backtrace; }; class cmCompiledGeneratorExpression { + CM_DISABLE_COPY(cmCompiledGeneratorExpression) + public: const char* Evaluate( cmLocalGenerator* lg, const std::string& config, bool quiet = false, @@ -133,9 +134,6 @@ private: friend class cmGeneratorExpression; - cmCompiledGeneratorExpression(const cmCompiledGeneratorExpression&); - void operator=(const cmCompiledGeneratorExpression&); - cmListFileBacktrace Backtrace; std::vector Evaluators; const std::string Input; diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index a6a341b..a0a826a 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -30,8 +30,7 @@ struct cmGeneratorExpressionEvaluator cmGeneratorExpressionDAGChecker*) const = 0; private: - cmGeneratorExpressionEvaluator(const cmGeneratorExpressionEvaluator&); - void operator=(const cmGeneratorExpressionEvaluator&); + CM_DISABLE_COPY(cmGeneratorExpressionEvaluator) }; struct TextContent : public cmGeneratorExpressionEvaluator diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index ae12f97..13b6b73 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -27,6 +27,8 @@ class cmTarget; class cmGeneratorTarget { + CM_DISABLE_COPY(cmGeneratorTarget) + public: cmGeneratorTarget(cmTarget*, cmLocalGenerator* lg); ~cmGeneratorTarget(); @@ -701,9 +703,6 @@ private: void CheckPropertyCompatibility(cmComputeLinkInformation* info, const std::string& config) const; - cmGeneratorTarget(cmGeneratorTarget const&); - void operator=(cmGeneratorTarget const&); - struct LinkImplClosure : public std::vector { LinkImplClosure() diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index bb1dd54..de19f98 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -21,6 +21,8 @@ class cmMakefile; */ class cmInstallGenerator : public cmScriptGenerator { + CM_DISABLE_COPY(cmInstallGenerator) + public: enum MessageLevel { diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index d8dacf3..27b8adb 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -4,7 +4,7 @@ #ifndef cmLinkLineComputer_h #define cmLinkLineComputer_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include @@ -16,6 +16,8 @@ class cmOutputConverter; class cmLinkLineComputer { + CM_DISABLE_COPY(cmLinkLineComputer) + public: cmLinkLineComputer(cmOutputConverter* outputConverter, cmStateDirectory stateDir); @@ -41,9 +43,6 @@ public: std::string const& config); protected: - cmLinkLineComputer(cmLinkLineComputer const&); - cmLinkLineComputer& operator=(cmLinkLineComputer const&); - std::string ComputeLinkLibs(cmComputeLinkInformation& cli); std::string ComputeRPath(cmComputeLinkInformation& cli); diff --git a/Source/cmLinkLineDeviceComputer.h b/Source/cmLinkLineDeviceComputer.h index a827b06..e9e98ac 100644 --- a/Source/cmLinkLineDeviceComputer.h +++ b/Source/cmLinkLineDeviceComputer.h @@ -18,6 +18,8 @@ class cmStateDirectory; class cmLinkLineDeviceComputer : public cmLinkLineComputer { + CM_DISABLE_COPY(cmLinkLineDeviceComputer) + public: cmLinkLineDeviceComputer(cmOutputConverter* outputConverter, cmStateDirectory stateDir); @@ -33,6 +35,8 @@ public: class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer { + CM_DISABLE_COPY(cmNinjaLinkLineDeviceComputer) + public: cmNinjaLinkLineDeviceComputer(cmOutputConverter* outputConverter, cmStateDirectory stateDir, diff --git a/Source/cmLocale.h b/Source/cmLocale.h index 086f448..9f90a3a 100644 --- a/Source/cmLocale.h +++ b/Source/cmLocale.h @@ -10,6 +10,8 @@ class cmLocaleRAII { + CM_DISABLE_COPY(cmLocaleRAII) + public: cmLocaleRAII() : OldLocale(setlocale(LC_CTYPE, CM_NULLPTR)) @@ -19,9 +21,6 @@ public: ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale.c_str()); } private: - cmLocaleRAII(cmLocaleRAII const&); - cmLocaleRAII& operator=(cmLocaleRAII const&); - std::string OldLocale; }; diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h index 612658c..e494060 100644 --- a/Source/cmMSVC60LinkLineComputer.h +++ b/Source/cmMSVC60LinkLineComputer.h @@ -15,6 +15,8 @@ class cmStateDirectory; class cmMSVC60LinkLineComputer : public cmLinkLineComputer { + CM_DISABLE_COPY(cmMSVC60LinkLineComputer) + public: cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter, cmStateDirectory stateDir); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 2f4cea6..52a6498 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -54,6 +54,8 @@ class cmVariableWatch; */ class cmMakefile { + CM_DISABLE_COPY(cmMakefile) + public: /* Mark a variable as used */ void MarkVariableAsUsed(const std::string& var); @@ -709,6 +711,7 @@ public: /** Helper class to push and pop scopes automatically. */ class ScopePushPop { + CM_DISABLE_COPY(ScopePushPop) public: ScopePushPop(cmMakefile* m) : Makefile(m) @@ -717,8 +720,6 @@ public: } ~ScopePushPop() { this->Makefile->PopScope(); } private: - ScopePushPop(ScopePushPop const&); - ScopePushPop& operator=(ScopePushPop const&); cmMakefile* Makefile; }; @@ -831,9 +832,6 @@ protected: cmExecutionStatus& status); private: - cmMakefile(const cmMakefile& mf); - cmMakefile& operator=(const cmMakefile& mf); - cmStateSnapshot StateSnapshot; cmListFileBacktrace Backtrace; diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h index db6d4a8..e612e88 100644 --- a/Source/cmNinjaLinkLineComputer.h +++ b/Source/cmNinjaLinkLineComputer.h @@ -16,6 +16,8 @@ class cmStateDirectory; class cmNinjaLinkLineComputer : public cmLinkLineComputer { + CM_DISABLE_COPY(cmNinjaLinkLineComputer) + public: cmNinjaLinkLineComputer(cmOutputConverter* outputConverter, cmStateDirectory stateDir, diff --git a/Source/cmScriptGenerator.cxx b/Source/cmScriptGenerator.cxx index 3cf2537..753a1ba 100644 --- a/Source/cmScriptGenerator.cxx +++ b/Source/cmScriptGenerator.cxx @@ -4,8 +4,6 @@ #include "cmSystemTools.h" -#include "cmConfigure.h" - cmScriptGenerator::cmScriptGenerator( const std::string& config_var, std::vector const& configurations) diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h index 4023f3e..d0879c6 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -3,7 +3,7 @@ #ifndef cmScriptGenerator_h #define cmScriptGenerator_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include #include @@ -47,6 +47,8 @@ inline std::ostream& operator<<(std::ostream& os, */ class cmScriptGenerator { + CM_DISABLE_COPY(cmScriptGenerator) + public: cmScriptGenerator(const std::string& config_var, std::vector const& configurations); @@ -87,9 +89,6 @@ protected: bool ActionsPerConfig; private: - cmScriptGenerator(cmScriptGenerator const&); - cmScriptGenerator& operator=(cmScriptGenerator const&); - void GenerateScriptActionsOnce(std::ostream& os, Indent indent); void GenerateScriptActionsPerConfig(std::ostream& os, Indent indent); }; diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 3ba2c22..d0902b1 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -3,7 +3,7 @@ #ifndef cmSystemTools_h #define cmSystemTools_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include "cmProcessOutput.h" #include "cmsys/Process.h" @@ -379,14 +379,12 @@ public: original environment. */ class SaveRestoreEnvironment { + CM_DISABLE_COPY(SaveRestoreEnvironment) public: SaveRestoreEnvironment(); ~SaveRestoreEnvironment(); private: - SaveRestoreEnvironment(SaveRestoreEnvironment const&); - SaveRestoreEnvironment& operator=(SaveRestoreEnvironment const&); - std::vector Env; }; #endif diff --git a/Source/cmTestGenerator.h b/Source/cmTestGenerator.h index 9a25e33..b227305 100644 --- a/Source/cmTestGenerator.h +++ b/Source/cmTestGenerator.h @@ -3,7 +3,7 @@ #ifndef cmTestGenerator_h #define cmTestGenerator_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include "cmScriptGenerator.h" @@ -20,6 +20,8 @@ class cmTest; */ class cmTestGenerator : public cmScriptGenerator { + CM_DISABLE_COPY(cmTestGenerator) + public: cmTestGenerator(cmTest* test, std::vector const& configurations = diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h index 14c82b1..ed76a88 100644 --- a/Source/cmXMLWriter.h +++ b/Source/cmXMLWriter.h @@ -3,7 +3,7 @@ #ifndef cmXMLWiter_h #define cmXMLWiter_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmConfigure.h" #include "cmXMLSafe.h" @@ -14,6 +14,8 @@ class cmXMLWriter { + CM_DISABLE_COPY(cmXMLWriter) + public: cmXMLWriter(std::ostream& output, std::size_t level = 0); ~cmXMLWriter(); @@ -63,9 +65,6 @@ public: void SetIndentationElement(std::string const& element); private: - cmXMLWriter(const cmXMLWriter&); - cmXMLWriter& operator=(const cmXMLWriter&); - void ConditionalLineBreak(bool condition, std::size_t indent); void PreAttribute(); diff --git a/Source/cmake.h b/Source/cmake.h index 6a6beb4..16a2830 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -55,6 +55,8 @@ struct cmDocumentationEntry; class cmake { + CM_DISABLE_COPY(cmake) + public: enum MessageType { @@ -460,8 +462,6 @@ protected: cmVariableWatch* VariableWatch; private: - cmake(const cmake&); // Not implemented. - void operator=(const cmake&); // Not implemented. ProgressCallbackType ProgressCallback; void* ProgressCallbackClientData; bool InTryCompile; -- cgit v0.12