From d59243211386487f834dd05a4b6fe64c4f5bf1a7 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 29 Jun 2011 21:19:08 +1000 Subject: [PATCH] Return a const reference to self in nocopy. While not technically necessary, it reduces warnings in cppcheck. --- nocopy.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nocopy.hpp b/nocopy.hpp index c90cb0a7..590655e8 100644 --- a/nocopy.hpp +++ b/nocopy.hpp @@ -27,8 +27,8 @@ class nocopy { nocopy () { ; } private: - nocopy (const nocopy &) { ; } - nocopy& operator =(const nocopy &) { unreachable (); } + nocopy (const nocopy &) { ; } + nocopy& operator =(const nocopy &) { unreachable (); return *this; } }; #endif