diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-31 04:24:53 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-31 04:24:53 +0000 |
commit | 010958178e2c41e7335732df35c00a8c04375bc9 (patch) | |
tree | c4cce6ba6eb162197c7f23417150ee14838745cc /crypto | |
parent | c7b4bab88578625632b1897d6546320a9349a0e8 (diff) | |
download | chromium_src-010958178e2c41e7335732df35c00a8c04375bc9.zip chromium_src-010958178e2c41e7335732df35c00a8c04375bc9.tar.gz chromium_src-010958178e2c41e7335732df35c00a8c04375bc9.tar.bz2 |
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
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/scoped_capi_types.h | 9 |
1 files changed, 3 insertions, 6 deletions
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<class CH, typename FP> -const FP ScopedCAPIHandle<CH, FP>::free_ = FP(); - template<class CH, typename FP> inline bool operator==(CH h, const ScopedCAPIHandle<CH, FP>& b) { return h == b.get(); |