You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +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:
@@ -3053,7 +3053,7 @@ bool GDScriptParser::has_comment(int p_line) {
|
||||
}
|
||||
|
||||
String GDScriptParser::get_doc_comment(int p_line, bool p_single_line) {
|
||||
const Map<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments();
|
||||
const HashMap<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments();
|
||||
ERR_FAIL_COND_V(!comments.has(p_line), String());
|
||||
|
||||
if (p_single_line) {
|
||||
@@ -3105,7 +3105,7 @@ String GDScriptParser::get_doc_comment(int p_line, bool p_single_line) {
|
||||
}
|
||||
|
||||
void GDScriptParser::get_class_doc_comment(int p_line, String &p_brief, String &p_desc, Vector<Pair<String, String>> &p_tutorials, bool p_inner_class) {
|
||||
const Map<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments();
|
||||
const HashMap<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments();
|
||||
if (!comments.has(p_line)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user