mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-10-26 12:27:44 +00:00 
			
		
		
		
	Add static assertions that the version number is consistent
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
		 Simon McVittie
					Simon McVittie
				
			
				
					committed by
					
						 Sam Lantinga
						Sam Lantinga
					
				
			
			
				
	
			
			
			 Sam Lantinga
						Sam Lantinga
					
				
			
						parent
						
							22002d9155
						
					
				
				
					commit
					63814ec767
				
			| @@ -62,6 +62,15 @@ extern int SDL_HelperWindowCreate(void); | ||||
| extern int SDL_HelperWindowDestroy(void); | ||||
| #endif | ||||
|  | ||||
| #ifdef SDL_BUILD_MAJOR_VERSION | ||||
| SDL_COMPILE_TIME_ASSERT(SDL_BUILD_MAJOR_VERSION, | ||||
|                         SDL_MAJOR_VERSION == SDL_BUILD_MAJOR_VERSION); | ||||
| SDL_COMPILE_TIME_ASSERT(SDL_BUILD_MINOR_VERSION, | ||||
|                         SDL_MINOR_VERSION == SDL_BUILD_MINOR_VERSION); | ||||
| SDL_COMPILE_TIME_ASSERT(SDL_BUILD_MICRO_VERSION, | ||||
|                         SDL_PATCHLEVEL == SDL_BUILD_MICRO_VERSION); | ||||
| #endif | ||||
|  | ||||
| SDL_COMPILE_TIME_ASSERT(SDL_MAJOR_VERSION_min, SDL_MAJOR_VERSION >= 0); | ||||
| /* Limited only by the need to fit in SDL_version */ | ||||
| SDL_COMPILE_TIME_ASSERT(SDL_MAJOR_VERSION_max, SDL_MAJOR_VERSION <= 255); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user