mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Replace find with contains/has where applicable
				
					
				
			* Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers
This commit is contained in:
		
							parent
							
								
									281fe39929
								
							
						
					
					
						commit
						a0dbdcc3ab
					
				
					 55 changed files with 219 additions and 219 deletions
				
			
		|  | @ -695,7 +695,7 @@ const lsp::DocumentSymbol *GDScriptWorkspace::resolve_symbol(const lsp::TextDocu | |||
| 
 | ||||
| 			} else { | ||||
| 				ScriptLanguage::LookupResult ret; | ||||
| 				if (symbol_identifier == "new" && parser->get_lines()[p_doc_pos.position.line].replace(" ", "").replace("\t", "").find("new(") > -1) { | ||||
| 				if (symbol_identifier == "new" && parser->get_lines()[p_doc_pos.position.line].replace(" ", "").replace("\t", "").contains("new(")) { | ||||
| 					symbol_identifier = "_init"; | ||||
| 				} | ||||
| 				if (OK == GDScriptLanguage::get_singleton()->lookup_code(parser->get_text_for_lookup_symbol(pos, symbol_identifier, p_func_required), symbol_identifier, path, nullptr, ret)) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 A Thousand Ships
						A Thousand Ships