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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/string_buffer.h b/core/string_buffer.h
index 0f0b572efb..956a6333d9 100644
--- a/core/string_buffer.h
+++ b/core/string_buffer.h
@@ -118,8 +118,9 @@ StringBuffer<SHORT_BUFFER_SIZE> &StringBuffer<SHORT_BUFFER_SIZE>::append(const C
template <int SHORT_BUFFER_SIZE>
StringBuffer<SHORT_BUFFER_SIZE> &StringBuffer<SHORT_BUFFER_SIZE>::reserve(int p_size) {
- if (p_size < SHORT_BUFFER_SIZE || p_size < buffer.size())
+ if (p_size < SHORT_BUFFER_SIZE || p_size < buffer.size()) {
return *this;
+ }
bool need_copy = string_length > 0 && buffer.empty();
buffer.resize(next_power_of_2(p_size));