From 8e57c4ca765d702a61d2e6363fd9b06e7e0c73c6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 7 Dec 2004 08:28:24 +0000 Subject: [PATCH] This should fix options menu crashes. Adding casts to the MOVE() macros didn't make it work, since there was no cast overload to bool&, etc; it just forced the (non-POD) type to that type, which resulted in the struct being clobbered. --- stepmania/src/Preference.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Preference.h b/stepmania/src/Preference.h index b716f87845..8d2039a0fd 100644 --- a/stepmania/src/Preference.h +++ b/stepmania/src/Preference.h @@ -63,7 +63,12 @@ public: m_currentValue = m_defaultValue; } - operator T () const + operator T& () + { + return m_currentValue; + } + + operator const T () const { return m_currentValue; }