diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-12-11 09:13:12 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-12-11 09:13:12 +0000 |
commit | fc55c1a5dea1b96db0fd36b9c854000ad4137bf1 (patch) | |
tree | fccd8d4b77a0fcdcf0f94c2bd91fd67a3b3edf72 /misc.h | |
parent | 0e9fb2487d1e8a4143e6a25d34e8b39439392926 (diff) | |
download | cryptopp-fc55c1a5dea1b96db0fd36b9c854000ad4137bf1.tar.gz |
improved method of disable inlining, fix compile on NetBSD
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@250 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -77,15 +77,15 @@ class Singleton public: Singleton(F objectFactory = F()) : m_objectFactory(objectFactory) {} - // VC60 workaround: use "..." to prevent this function from being inlined - const T & Ref(...) const; + // prevent this function from being inlined + CRYPTOPP_NOINLINE const T & Ref(CRYPTOPP_NOINLINE_DOTDOTDOT) const; private: F m_objectFactory; }; template <class T, class F, int instance> -const T & Singleton<T, F, instance>::Ref(...) const +const T & Singleton<T, F, instance>::Ref(CRYPTOPP_NOINLINE_DOTDOTDOT) const { static simple_ptr<T> s_pObject; static char s_objectState = 0; |