diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-20 15:37:31 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-20 15:37:31 +0100 |
commit | ead18458c76ccabf0dc57ea869679b462762e9ef (patch) | |
tree | 484a143cffb518a5e619562097a20ae31f2ec041 /core | |
parent | 9dc2739c1f361225152ccdcb8dc3f4c7578e7429 (diff) | |
parent | e791f4fce275247a66eb657ff7cc7be4ffd4d5bc (diff) |
Merge pull request #68917 from Mickeon/double-the-pride-twice-the-fall
Double precision of `String.split_floats`
Diffstat (limited to 'core')
-rw-r--r-- | core/string/ustring.cpp | 4 | ||||
-rw-r--r-- | core/string/ustring.h | 2 |
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; |