mirror of
				https://git.suyu.dev/suyu/suyu.git
				synced 2025-11-04 20:44:02 +08:00 
			
		
		
		
	bit_field: Convert ToBool() into explicit operator bool
Gets rid of a TODO that is long overdue.
This commit is contained in:
		
							parent
							
								
									bf89a99839
								
							
						
					
					
						commit
						36090521ce
					
				@ -178,8 +178,7 @@ public:
 | 
			
		||||
        return ExtractValue(storage);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // TODO: we may want to change this to explicit operator bool() if it's bug-free in VS2015
 | 
			
		||||
    constexpr FORCE_INLINE bool ToBool() const {
 | 
			
		||||
    constexpr explicit operator bool() const {
 | 
			
		||||
        return Value() != 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user