From e6161b7bd269e04376ef07f3b9b839515567930f Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Thu, 12 Mar 2015 17:47:57 +0100 Subject: [PATCH] auth/Auth.h: mark constructor as explicit Fix for cppcheck warning: Struct 'AuthAuthorizer' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided. For more information check: http://www.tantalon.com/pete/cppopt/asyougo.htm#UseExplicitConstructors Signed-off-by: Danny Al-Gaaf --- src/auth/Auth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/Auth.h b/src/auth/Auth.h index 2d89a033e5c..12d49094b43 100644 --- a/src/auth/Auth.h +++ b/src/auth/Auth.h @@ -136,7 +136,7 @@ struct AuthAuthorizer { bufferlist bl; CryptoKey session_key; - AuthAuthorizer(__u32 p) : protocol(p) {} + explicit AuthAuthorizer(__u32 p) : protocol(p) {} virtual ~AuthAuthorizer() {} virtual bool verify_reply(bufferlist::iterator& reply) = 0; }; -- 2.47.3