mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 21:51:22 +00:00 
			
		
		
		
	Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
This commit is contained in:
		
							parent
							
								
									396def9b66
								
							
						
					
					
						commit
						746dddc067
					
				
					 587 changed files with 3707 additions and 3538 deletions
				
			
		|  | @ -43,11 +43,11 @@ void TextEditor::add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlight | |||
| void TextEditor::set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) { | ||||
| 	ERR_FAIL_COND(p_highlighter.is_null()); | ||||
| 
 | ||||
| 	Map<String, Ref<EditorSyntaxHighlighter>>::Element *el = highlighters.front(); | ||||
| 	while (el != nullptr) { | ||||
| 		int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key()); | ||||
| 		highlighter_menu->set_item_checked(highlighter_index, el->value() == p_highlighter); | ||||
| 		el = el->next(); | ||||
| 	HashMap<String, Ref<EditorSyntaxHighlighter>>::Iterator el = highlighters.begin(); | ||||
| 	while (el) { | ||||
| 		int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key); | ||||
| 		highlighter_menu->set_item_checked(highlighter_index, el->value == p_highlighter); | ||||
| 		++el; | ||||
| 	} | ||||
| 
 | ||||
| 	CodeEdit *te = code_editor->get_text_editor(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 reduz
						reduz