mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
This commit is contained in:
		
							
								
								
									
										8
									
								
								include/external/clara.h
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								include/external/clara.h
									
									
									
									
										vendored
									
									
								
							@@ -264,11 +264,11 @@ namespace Clara {
 | 
			
		||||
        template<typename ConfigT>
 | 
			
		||||
        class BoundArgFunction {
 | 
			
		||||
        public:
 | 
			
		||||
            BoundArgFunction() : functionObj( NULL ) {}
 | 
			
		||||
            BoundArgFunction() : functionObj( CATCH_NULL ) {}
 | 
			
		||||
            BoundArgFunction( IArgFunction<ConfigT>* _functionObj ) : functionObj( _functionObj ) {}
 | 
			
		||||
            BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj ? other.functionObj->clone() : NULL ) {}
 | 
			
		||||
            BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj ? other.functionObj->clone() : CATCH_NULL ) {}
 | 
			
		||||
            BoundArgFunction& operator = ( BoundArgFunction const& other ) {
 | 
			
		||||
                IArgFunction<ConfigT>* newFunctionObj = other.functionObj ? other.functionObj->clone() : NULL;
 | 
			
		||||
                IArgFunction<ConfigT>* newFunctionObj = other.functionObj ? other.functionObj->clone() : CATCH_NULL;
 | 
			
		||||
                delete functionObj;
 | 
			
		||||
                functionObj = newFunctionObj;
 | 
			
		||||
                return *this;
 | 
			
		||||
@@ -284,7 +284,7 @@ namespace Clara {
 | 
			
		||||
            bool takesArg() const { return functionObj->takesArg(); }
 | 
			
		||||
 | 
			
		||||
            bool isSet() const {
 | 
			
		||||
                return functionObj != NULL;
 | 
			
		||||
                return functionObj != CATCH_NULL;
 | 
			
		||||
            }
 | 
			
		||||
        private:
 | 
			
		||||
            IArgFunction<ConfigT>* functionObj;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user