From a930de85d88891b2516c60306bb49cc85d38c5a8 Mon Sep 17 00:00:00 2001 From: KWSys Upstream Date: Thu, 14 Feb 2019 10:13:42 -0500 Subject: KWSys 2019-02-14 (e270ce9f) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit e270ce9fc60971006e934e9d53d11be5f85efc39 (master). Upstream Shortlog ----------------- Albert Astals Cid (2): 95ced423 hashtable: delete assignment operator instead of poisoning it 6090d36b Glob: Use the default copy constructor and assignment operator --- Glob.hxx.in | 14 +++----------- hashtable.hxx.in | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Glob.hxx.in b/Glob.hxx.in index bd4a176..4c3bde1 100644 --- a/Glob.hxx.in +++ b/Glob.hxx.in @@ -41,17 +41,9 @@ public: , content(c) { } - Message(const Message& msg) - : type(msg.type) - , content(msg.content) - { - } - Message& operator=(Message const& msg) - { - this->type = msg.type; - this->content = msg.content; - return *this; - } + ~Message() = default; + Message(const Message& msg) = default; + Message& operator=(Message const& msg) = default; }; typedef std::vector GlobMessages; diff --git a/hashtable.hxx.in b/hashtable.hxx.in index fc0d60e..0981c66 100644 --- a/hashtable.hxx.in +++ b/hashtable.hxx.in @@ -73,7 +73,7 @@ struct _Hashtable_node void public_method_to_quiet_warning_about_all_methods_private(); private: - void operator=(_Hashtable_node<_Val> const&); // poison node assignment + void operator=(_Hashtable_node<_Val> const&) = delete; }; template