mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	more brief
This commit is contained in:
		
							
								
								
									
										10
									
								
								hyper.h
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								hyper.h
									
									
									
									
									
								
							| @@ -21,26 +21,26 @@ | ||||
| #include <stdarg.h> | ||||
| #include "hyper_function.h" | ||||
|  | ||||
| /** the main namespace of HyperRogue */ | ||||
| /** \brief the main namespace of HyperRogue */ | ||||
| namespace hr { | ||||
|  | ||||
| /** A helper structure that acts as a boolean which is always false. Helpful when disabling stuff with compiler flags. */ | ||||
| /** \brief A helper structure that acts as a boolean which is always false. Helpful when disabling stuff with compiler flags. */ | ||||
| struct always_false { | ||||
|   operator bool() const { return false; }; | ||||
|   bool operator = (bool b) const { return b; }; | ||||
|   }; | ||||
|  | ||||
| /** placate GCC's overzealous -Wunused-result */ | ||||
| /** \brief placate GCC's overzealous -Wunused-result */ | ||||
| template<class T> | ||||
| void ignore(T&&) { | ||||
|   } | ||||
|  | ||||
| /** \brief a simple static_cast<void*> for use with printf("%p") */ | ||||
| inline const void *voidp(const void *p) { | ||||
|   // a simple static_cast<void*> for use with printf("%p") | ||||
|   return p; | ||||
|   } | ||||
|  | ||||
| /** Is the value of first parameter equal to one of the remaining parameters? */ | ||||
| /** \brief Is the value of first parameter equal to one of the remaining parameters? */ | ||||
| template<class T, class V, class... U> bool among(T x, V y) { return x == y; } | ||||
| template<class T, class V, class... U> bool among(T x, V y, U... u) { return x==y || among(x,u...); } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue