diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-09-22 16:51:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-22 16:51:43 +0200 |
commit | a4c2890a7b7e27bf2c4a662aef582473029d4762 (patch) | |
tree | 08dbb89621bcbe59f3c2b45d181f929c91e080a8 /core/io/stream_peer.h | |
parent | e863bbb3b0598823cf7fa064a951fafe77edcd50 (diff) | |
parent | b9707ce08fe65f3a1fa09f033351a32077dde906 (diff) |
Merge pull request #22335 from Faless/get_stream_string_no_len
StreamPeer get[_utf8]_string with negative length.
Diffstat (limited to 'core/io/stream_peer.h')
-rw-r--r-- | core/io/stream_peer.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h index 9d2e0340b0..f189960cbd 100644 --- a/core/io/stream_peer.h +++ b/core/io/stream_peer.h @@ -71,6 +71,7 @@ public: void put_u64(uint64_t p_val); void put_float(float p_val); void put_double(double p_val); + void put_string(const String &p_string); void put_utf8_string(const String &p_string); void put_var(const Variant &p_variant); @@ -84,8 +85,8 @@ public: int64_t get_64(); float get_float(); double get_double(); - String get_string(int p_bytes); - String get_utf8_string(int p_bytes); + String get_string(int p_bytes = -1); + String get_utf8_string(int p_bytes = -1); Variant get_var(); StreamPeer() { big_endian = false; } |