summaryrefslogtreecommitdiff
path: root/core/string_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/string_buffer.h')
-rw-r--r--core/string_buffer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/string_buffer.h b/core/string_buffer.h
index b148e45544..5d3be0ecf1 100644
--- a/core/string_buffer.h
+++ b/core/string_buffer.h
@@ -39,10 +39,10 @@ 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();
+ return static_cast<String &>(buffer).empty() ? short_buffer : buffer.ptrw();
}
public:
@@ -79,6 +79,10 @@ public:
_FORCE_INLINE_ operator String() {
return as_string();
}
+
+ StringBuffer() {
+ string_length = 0;
+ }
};
template <int SHORT_BUFFER_SIZE>