From: Oliver Kurth Date: Tue, 5 Dec 2017 00:27:20 +0000 (-0800) Subject: Make AutoCPtr's constructor explicit to make it more obvious when X-Git-Tag: stable-10.3.0~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb8456de3ddb41ecc7155c447e4bac17ca440a5d;p=thirdparty%2Fopen-vm-tools.git Make AutoCPtr's constructor explicit to make it more obvious when pointer ownership is transferred. (This also matches std::auto_ptr.) --- diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/autoCPtr.hh b/open-vm-tools/services/plugins/dndcp/stringxx/autoCPtr.hh index e1f903445..ccb1e4057 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/autoCPtr.hh +++ b/open-vm-tools/services/plugins/dndcp/stringxx/autoCPtr.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2017 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -44,8 +44,8 @@ private: typedef AutoCPtr SelfType; public: - AutoCPtr(T* p = NULL, // IN/OPT - FreeFunc f = std::free) // IN/OPT + explicit AutoCPtr(T* p = NULL, // IN/OPT + FreeFunc f = std::free) // IN/OPT : mP(p), mFree(f) {