You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Match the coding style for concatenating String
This commit is contained in:
@@ -215,7 +215,10 @@ StringName NodePath::get_concatenated_names() const {
|
|||||||
String concatenated;
|
String concatenated;
|
||||||
const StringName *sn = data->path.ptr();
|
const StringName *sn = data->path.ptr();
|
||||||
for (int i = 0; i < pc; i++) {
|
for (int i = 0; i < pc; i++) {
|
||||||
concatenated += i == 0 ? sn[i].operator String() : "/" + sn[i];
|
if (i > 0) {
|
||||||
|
concatenated += "/";
|
||||||
|
}
|
||||||
|
concatenated += sn[i].operator String();
|
||||||
}
|
}
|
||||||
data->concatenated_path = concatenated;
|
data->concatenated_path = concatenated;
|
||||||
}
|
}
|
||||||
@@ -230,7 +233,10 @@ StringName NodePath::get_concatenated_subnames() const {
|
|||||||
String concatenated;
|
String concatenated;
|
||||||
const StringName *ssn = data->subpath.ptr();
|
const StringName *ssn = data->subpath.ptr();
|
||||||
for (int i = 0; i < spc; i++) {
|
for (int i = 0; i < spc; i++) {
|
||||||
concatenated += i == 0 ? ssn[i].operator String() : ":" + ssn[i];
|
if (i > 0) {
|
||||||
|
concatenated += ":";
|
||||||
|
}
|
||||||
|
concatenated += ssn[i].operator String();
|
||||||
}
|
}
|
||||||
data->concatenated_subpath = concatenated;
|
data->concatenated_subpath = concatenated;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,10 @@ void SkeletonProfile::_validate_property(PropertyInfo &p_property) const {
|
|||||||
if (p_property.name == ("root_bone") || p_property.name == ("scale_base_bone")) {
|
if (p_property.name == ("root_bone") || p_property.name == ("scale_base_bone")) {
|
||||||
String hint = "";
|
String hint = "";
|
||||||
for (int i = 0; i < bones.size(); i++) {
|
for (int i = 0; i < bones.size(); i++) {
|
||||||
hint += i == 0 ? String(bones[i].bone_name) : "," + String(bones[i].bone_name);
|
if (i > 0) {
|
||||||
|
hint += ",";
|
||||||
|
}
|
||||||
|
hint += String(bones[i].bone_name);
|
||||||
}
|
}
|
||||||
p_property.hint_string = hint;
|
p_property.hint_string = hint;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user