summaryrefslogtreecommitdiff
path: root/core/node_path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/node_path.cpp')
-rw-r--r--core/node_path.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/node_path.cpp b/core/node_path.cpp
index 07ff765516..a4b7cbe2eb 100644
--- a/core/node_path.cpp
+++ b/core/node_path.cpp
@@ -357,7 +357,7 @@ NodePath::NodePath(const String &p_path) {
String path = p_path;
Vector<StringName> subpath;
- int absolute = (path[0] == '/') ? 1 : 0;
+ bool absolute = (path[0] == '/');
bool last_is_slash = true;
bool has_slashes = false;
int slices = 0;
@@ -387,7 +387,7 @@ NodePath::NodePath(const String &p_path) {
path = path.substr(0, subpath_pos);
}
- for (int i = absolute; i < path.length(); i++) {
+ for (int i = (int)absolute; i < path.length(); i++) {
if (path[i] == '/') {
@@ -407,7 +407,7 @@ NodePath::NodePath(const String &p_path) {
data = memnew(Data);
data->refcount.init();
- data->absolute = absolute ? true : false;
+ data->absolute = absolute;
data->has_slashes = has_slashes;
data->subpath = subpath;
data->hash_cache_valid = false;
@@ -416,10 +416,10 @@ NodePath::NodePath(const String &p_path) {
return;
data->path.resize(slices);
last_is_slash = true;
- int from = absolute;
+ int from = (int)absolute;
int slice = 0;
- for (int i = absolute; i < path.length() + 1; i++) {
+ for (int i = (int)absolute; i < path.length() + 1; i++) {
if (path[i] == '/' || path[i] == 0) {