From 010958178e2c41e7335732df35c00a8c04375bc9 Mon Sep 17 00:00:00 2001 From: "rsleevi@chromium.org" Date: Wed, 31 Aug 2011 04:24:53 +0000 Subject: Remove a static initializer from ScopedCAPIHandle BUG=87171 TEST=none Review URL: http://codereview.chromium.org/7776025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98923 0039d316-1c4b-4281-b951-d872f2087c98 --- crypto/scoped_capi_types.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'crypto') diff --git a/crypto/scoped_capi_types.h b/crypto/scoped_capi_types.h index f565121..51e2f72 100644 --- a/crypto/scoped_capi_types.h +++ b/crypto/scoped_capi_types.h @@ -51,12 +51,13 @@ class ScopedCAPIHandle { explicit ScopedCAPIHandle(CAPIHandle handle = NULL) : handle_(handle) {} ~ScopedCAPIHandle() { - free_(handle_); + reset(); } void reset(CAPIHandle handle = NULL) { if (handle_ != handle) { - free_(handle_); + FreeProc free_proc; + free_proc(handle_); handle_ = handle; } } @@ -91,14 +92,10 @@ class ScopedCAPIHandle { private: CAPIHandle handle_; - static const FreeProc free_; DISALLOW_COPY_AND_ASSIGN(ScopedCAPIHandle); }; -template -const FP ScopedCAPIHandle::free_ = FP(); - template inline bool operator==(CH h, const ScopedCAPIHandle& b) { return h == b.get(); -- cgit v1.1