summaryrefslogtreecommitdiff
path: root/editor/import/collada.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/import/collada.cpp')
-rw-r--r--editor/import/collada.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index 2cc534d96d..605f385de2 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -287,7 +287,7 @@ void Collada::_parse_image(XMLParser &parser) {
if (state.version < State::Version(1, 4, 0)) {
/* <1.4 */
String path = parser.get_attribute_value("source").strip_edges();
- if (path.find("://") == -1 && path.is_relative_path()) {
+ if (!path.contains("://") && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.uri_decode()));
}
@@ -300,7 +300,7 @@ void Collada::_parse_image(XMLParser &parser) {
parser.read();
String path = parser.get_node_data().strip_edges().uri_decode();
- if (path.find("://") == -1 && path.is_relative_path()) {
+ if (!path.contains("://") && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path));
@@ -411,8 +411,9 @@ Vector<String> Collada::_read_string_array(XMLParser &parser) {
}
Transform3D Collada::_read_transform(XMLParser &parser) {
- if (parser.is_empty())
+ if (parser.is_empty()) {
return Transform3D();
+ }
Vector<String> array;
while (parser.read() == OK) {
@@ -1831,10 +1832,10 @@ void Collada::_parse_animation(XMLParser &parser) {
}
}
- if (target.find("/") != -1) { //transform component
+ if (target.contains("/")) { //transform component
track.target = target.get_slicec('/', 0);
track.param = target.get_slicec('/', 1);
- if (track.param.find(".") != -1) {
+ if (track.param.contains(".")) {
track.component = track.param.get_slice(".", 1).to_upper();
}
track.param = track.param.get_slice(".", 0);