From 0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 16:41:43 +0200 Subject: Style: Enforce braces around if blocks and loops Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html --- core/string_buffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/string_buffer.h') 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 &StringBuffer::append(const C template StringBuffer &StringBuffer::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)); -- cgit v1.2.3