Closed NilsIrl closed 5 years ago
I think it would be good to change most of those (excluding false positives) to use plus_file()
indeed.
Wouldn't
initial_subname = initial_subname.plus_file(data->path[i]);
Make useless allocations?
If this is the case wouldn't it better to also add another method to String
that adds without creating a new string using +=
rather than +
I guess the few += "/"
occurrences can stay as is, it's probably not worth over engineering it.
Working on it (so that someone else doesn't work on it at the same time)
Fixed by #29815.
Issue description:
On many instances,
[+=] "/" +
is used instead ofplus_file()
. I was told in https://github.com/godotengine/godot/pull/29198#discussion_r287728562 to use it over[+=] "/" +
just for consistency. Should this be changed throughout the code base?Please keep in mind that this grep output may have many false positives (The type isn't even a String or it doesn't semantically make sense to change anything).