Add const references detected by clang-tidy
This commit is contained in:
parent
2d0ee20ff3
commit
a3cb1b096f
57 changed files with 120 additions and 120 deletions
|
|
@ -620,9 +620,9 @@ static String _trim_parent_class(const String &p_class, const String &p_base_cla
|
|||
}
|
||||
Vector<String> names = p_class.split(".", false, 1);
|
||||
if (names.size() == 2) {
|
||||
String first = names[0];
|
||||
String rest = names[1];
|
||||
const String &first = names[0];
|
||||
if (ClassDB::class_exists(p_base_class) && ClassDB::class_exists(first) && ClassDB::is_parent_class(p_base_class, first)) {
|
||||
const String &rest = names[1];
|
||||
return rest;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ GDScriptParser::ClassNode *GDScriptParser::find_class(const String &p_qualified_
|
|||
|
||||
// Starts at index 1 because index 0 was handled above.
|
||||
for (int i = 1; result != nullptr && i < class_names.size(); i++) {
|
||||
String current_name = class_names[i];
|
||||
const String ¤t_name = class_names[i];
|
||||
GDScriptParser::ClassNode *next = nullptr;
|
||||
if (result->has_member(current_name)) {
|
||||
GDScriptParser::ClassNode::Member member = result->get_member(current_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue