Fix several in-class initialization clang warning

This commit is contained in:
Marcelo Fernandez 2018-03-22 00:17:18 -03:00
parent f2df8c94b2
commit 35d21c0881
7 changed files with 18 additions and 9 deletions

View file

@ -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>