aboutsummaryrefslogtreecommitdiff
path: root/core/string_buffer.h
diff options
context:
space:
mode:
authorRémi Verschelde2018-03-22 16:47:32 +0100
committerGitHub2018-03-22 16:47:32 +0100
commitcc34406b5d48c8c09d51c0c8fe6d94b91303745f (patch)
tree47b7a45f0ba9ac94459da6afac4fd96e4bc39dae /core/string_buffer.h
parent4b00cc9f8a7cbdf851cc54c1b7fcb9e7805e1ece (diff)
parent35d21c08813242002e31f1d9bbc45fed5a21ebde (diff)
downloadgodot-cc34406b5d48c8c09d51c0c8fe6d94b91303745f.tar.gz
godot-cc34406b5d48c8c09d51c0c8fe6d94b91303745f.tar.zst
godot-cc34406b5d48c8c09d51c0c8fe6d94b91303745f.zip
Diffstat (limited to 'core/string_buffer.h')
-rw-r--r--core/string_buffer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/string_buffer.h b/core/string_buffer.h
index b148e4554..7e9b151be 100644
--- a/core/string_buffer.h
+++ b/core/string_buffer.h
@@ -39,7 +39,7 @@ class StringBuffer {
CharType short_buffer[SHORT_BUFFER_SIZE];
String buffer;
- int string_length = 0;
+ int string_length;
_FORCE_INLINE_ CharType *current_buffer_ptr() {
return static_cast<Vector<CharType> &>(buffer).empty() ? short_buffer : buffer.ptrw();
@@ -79,6 +79,10 @@ public:
_FORCE_INLINE_ operator String() {
return as_string();
}
+
+ StringBuffer() {
+ string_length = 0;
+ }
};
template <int SHORT_BUFFER_SIZE>