From c7f6f52da1df1e74a07d46cf164420e2a53d17ec Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Thu, 5 Jan 2006 06:08:19 +0000 Subject: [PATCH] fix "unused function CheckXToStringParamType" removed warnings --- stepmania/src/EnumHelper.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/EnumHelper.h b/stepmania/src/EnumHelper.h index c152fe8472..c24356e1c5 100644 --- a/stepmania/src/EnumHelper.h +++ b/stepmania/src/EnumHelper.h @@ -47,11 +47,12 @@ static const CString EMPTY_STRING; // TypeName[] must be an array of const char *, not RString, to // avoid initialization order problems when calling XToString. -static void CheckXToStringParamType( const char **p ) { } +// Use Check##X##ToStringParamType to enforce that. #define XToString(X, CNT) \ + static void Check##X##ToStringParamType( const char **p ) { } \ const CString& X##ToString( X x ) \ { \ - CheckXToStringParamType( X##Names ); \ + Check##X##ToStringParamType( X##Names ); \ static auto_ptr as_##X##Name[CNT]; \ if( as_##X##Name[0].get() == NULL ) { \ for( unsigned i = 0; i < CNT; ++i ) \