From 975efaa8c9e527a7f99d198deee7194101b3df8d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 31 Jul 2018 03:55:40 +0200 Subject: dselect: Disable copy constructor and = operator for methodlist class The constructor deals with dynamically allocated memory, so we should not be using the default copy constructor and = operators, disabled them to avoid surprises. Warned-by: cppcheck --- dselect/method.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dselect/method.h b/dselect/method.h index f9593ec27..415325c59 100644 --- a/dselect/method.h +++ b/dselect/method.h @@ -78,6 +78,8 @@ protected: void kd_abort(); methodlist(); + methodlist(const methodlist &) = delete; + methodlist &operator =(const methodlist &) = delete; quitaction display(); ~methodlist(); }; -- cgit v1.2.3