Remove GUARANTEE macro
This commit is contained in:
		
							parent
							
								
									829d2505e3
								
							
						
					
					
						commit
						a31992aac7
					
				
							
								
								
									
										10
									
								
								typedefs.h
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								typedefs.h
									
									
									
									
									
								
							@ -35,16 +35,14 @@ or see http://www.gnu.org/licenses/agpl.txt.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <iostream>
 | 
					#include <iostream>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define INFO(x) do {std::cout << "[info " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
 | 
					#define INFO(x) do {std::cout << "[i " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
 | 
				
			||||||
#define ERR(x) do {std::cerr << "[error " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl; std::exit(-1);} while(0);
 | 
					#define ERR(x) do {std::cerr << "[! " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl; std::exit(-1);} while(0);
 | 
				
			||||||
#define WARN(x) do {std::cerr << "[warn " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
 | 
					#define WARN(x) do {std::cerr << "[? " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef NDEBUG
 | 
					#ifdef NDEBUG
 | 
				
			||||||
#define DEBUG(x)
 | 
					#define DEBUG(x)
 | 
				
			||||||
#define GUARANTEE(x,y)
 | 
					 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define DEBUG(x) do {std::cout << "[debug " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
 | 
					#define DEBUG(x) do {std::cout << "[d " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
 | 
				
			||||||
#define GUARANTEE(x,y) do { {do{ if(false == (x)) { ERR(y) } } while(0);} } while(0);
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef M_PI
 | 
					#ifndef M_PI
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user