Added some parentheses for a little more macro safety. Recommended by Petri
authorRyan C. Gordon <icculus@icculus.org>
Sun, 17 Apr 2005 10:16:30 +0000
changeset 1046f09d5edfc7a3
parent 1045 63b8e93a3a52
child 1047 ffaaf7ecf685
Added some parentheses for a little more macro safety. Recommended by Petri
Kero, here: http://www.devolution.com/pipermail/sdl/2005-March/067630.html
include/SDL_cdrom.h
include/SDL_mouse.h
include/SDL_version.h
     1.1 --- a/include/SDL_cdrom.h	Fri Apr 01 15:19:26 2005 +0000
     1.2 +++ b/include/SDL_cdrom.h	Sun Apr 17 10:16:30 2005 +0000
     1.3 @@ -60,7 +60,7 @@
     1.4  } CDstatus;
     1.5  
     1.6  /* Given a status, returns true if there's a disk in the drive */
     1.7 -#define CD_INDRIVE(status)	((int)status > 0)
     1.8 +#define CD_INDRIVE(status)	((int)(status) > 0)
     1.9  
    1.10  typedef struct SDL_CDtrack {
    1.11  	Uint8 id;		/* Track number */
     2.1 --- a/include/SDL_mouse.h	Fri Apr 01 15:19:26 2005 +0000
     2.2 +++ b/include/SDL_mouse.h	Sun Apr 17 10:16:30 2005 +0000
     2.3 @@ -120,7 +120,7 @@
     2.4     Button 4:	Mouse wheel up	 (may also be a real button)
     2.5     Button 5:	Mouse wheel down (may also be a real button)
     2.6   */
     2.7 -#define SDL_BUTTON(X)		(SDL_PRESSED<<(X-1))
     2.8 +#define SDL_BUTTON(X)		(SDL_PRESSED << ((X)-1))
     2.9  #define SDL_BUTTON_LEFT		1
    2.10  #define SDL_BUTTON_MIDDLE	2
    2.11  #define SDL_BUTTON_RIGHT	3
     3.1 --- a/include/SDL_version.h	Fri Apr 01 15:19:26 2005 +0000
     3.2 +++ b/include/SDL_version.h	Sun Apr 17 10:16:30 2005 +0000
     3.3 @@ -65,7 +65,7 @@
     3.4     This assumes that there will never be more than 100 patchlevels
     3.5  */
     3.6  #define SDL_VERSIONNUM(X, Y, Z)						\
     3.7 -	(X)*1000 + (Y)*100 + (Z)
     3.8 +	((X)*1000 + (Y)*100 + (Z))
     3.9  
    3.10  /* This is the version number macro for the current SDL version */
    3.11  #define SDL_COMPILEDVERSION \