summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-12-11 09:13:12 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-12-11 09:13:12 +0000
commitfc55c1a5dea1b96db0fd36b9c854000ad4137bf1 (patch)
treefccd8d4b77a0fcdcf0f94c2bd91fd67a3b3edf72 /misc.h
parent0e9fb2487d1e8a4143e6a25d34e8b39439392926 (diff)
downloadcryptopp-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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc.h b/misc.h
index 0b166ec..35462b8 100644
--- a/misc.h
+++ b/misc.h
@@ -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;