mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Optimize GDScriptLambdaCallable by skipping the unnecessary ObjectDB lookup for script.
				
					
				
			This commit is contained in:
		
							parent
							
								
									172fc62c80
								
							
						
					
					
						commit
						279505d8b0
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -45,7 +45,9 @@ bool GDScriptLambdaCallable::compare_less(const CallableCustom *p_a, const Calla | |||
| } | ||||
| 
 | ||||
| bool GDScriptLambdaCallable::is_valid() const { | ||||
| 	return CallableCustom::is_valid() && function != nullptr; | ||||
| 	// Don't need to call CallableCustom::is_valid():
 | ||||
| 	// It just verifies our script exists, which we know to be true because it is RefCounted.
 | ||||
| 	return function != nullptr; | ||||
| } | ||||
| 
 | ||||
| uint32_t GDScriptLambdaCallable::hash() const { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lukas Tenbrink
						Lukas Tenbrink