diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index b9078617b9..a154fc7116 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -225,7 +225,6 @@ const AutoJoyMapping g_AutoJoyMappings[] = } }, }; -const int NUM_AUTO_JOY_MAPPINGS = ARRAYSIZE(g_AutoJoyMappings); void InputMapper::AutoMapJoysticksForCurrentGame() { @@ -240,7 +239,7 @@ void InputMapper::AutoMapJoysticksForCurrentGame() { InputDevice device = vDevices[i]; CString sDescription = vDescriptions[i]; - for( int j=0; jRelease(); (p)=NULL; } } #define ZERO(x) memset(&x, 0, sizeof(x)) -#define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); } +#define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&(a), &(b), sizeof(a)); } #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) /* Common harmless mismatches. All min(T,T) and max(T,T) cases are handled diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index c3c5727f19..47ddb077ae 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -60,7 +60,7 @@ const char NAME_CHARS[] = { ' ',' ',' ',' ','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' }; -#define NUM_NAME_CHARS (sizeof(NAME_CHARS)/sizeof(char)) +#define NUM_NAME_CHARS (ARRAYSIZE(NAME_CHARS)) #define HEIGHT_OF_ALL_CHARS (NUM_NAME_CHARS * g_fCharsSpacingY)