summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-11-20 12:29:50 +0100
committerMicky <micheledevita2@gmail.com>2022-11-20 12:29:50 +0100
commite791f4fce275247a66eb657ff7cc7be4ffd4d5bc (patch)
tree00b1015cdb150ca4277c47f665a630cbb73c0ca9 /core
parent8aafcf9d2ae43e83636d60dbfd5f10e50fcdb324 (diff)
Double precision of `String.split_floats`
Diffstat (limited to 'core')
-rw-r--r--core/string/ustring.cpp4
-rw-r--r--core/string/ustring.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 8993f9667d..175c42542b 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -1256,8 +1256,8 @@ Vector<String> String::rsplit(const String &p_splitter, bool p_allow_empty, int
return ret;
}
-Vector<float> String::split_floats(const String &p_splitter, bool p_allow_empty) const {
- Vector<float> ret;
+Vector<double> String::split_floats(const String &p_splitter, bool p_allow_empty) const {
+ Vector<double> ret;
int from = 0;
int len = length();
diff --git a/core/string/ustring.h b/core/string/ustring.h
index 8af74584f3..0c171024f7 100644
--- a/core/string/ustring.h
+++ b/core/string/ustring.h
@@ -348,7 +348,7 @@ public:
Vector<String> split(const String &p_splitter = "", bool p_allow_empty = true, int p_maxsplit = 0) const;
Vector<String> rsplit(const String &p_splitter = "", bool p_allow_empty = true, int p_maxsplit = 0) const;
Vector<String> split_spaces() const;
- Vector<float> split_floats(const String &p_splitter, bool p_allow_empty = true) const;
+ Vector<double> split_floats(const String &p_splitter, bool p_allow_empty = true) const;
Vector<float> split_floats_mk(const Vector<String> &p_splitters, bool p_allow_empty = true) const;
Vector<int> split_ints(const String &p_splitter, bool p_allow_empty = true) const;
Vector<int> split_ints_mk(const Vector<String> &p_splitters, bool p_allow_empty = true) const;