diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-05-28 11:53:16 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-28 17:31:20 +0200 |
commit | 0dc9af5f7e26b0dfa42cb75c900b9ef7a2192425 (patch) | |
tree | 93dbbbeb714f258bd7fb044633eb83bdcd908286 /AK/String.cpp | |
parent | c11351ac507f863699d78aec46a77bd4d59e743c (diff) | |
download | serenity-0dc9af5f7e26b0dfa42cb75c900b9ef7a2192425.zip |
Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
Diffstat (limited to 'AK/String.cpp')
-rw-r--r-- | AK/String.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/AK/String.cpp b/AK/String.cpp index 8544e4c98a..5ec6f355ee 100644 --- a/AK/String.cpp +++ b/AK/String.cpp @@ -38,7 +38,7 @@ String String::empty() String String::isolated_copy() const { if (!m_impl) - return { }; + return {}; if (!m_impl->length()) return empty(); char* buffer; @@ -50,7 +50,7 @@ String String::isolated_copy() const String String::substring(int start, int length) const { if (!length) - return { }; + return {}; ASSERT(m_impl); ASSERT(start + length <= m_impl->length()); // FIXME: This needs some input bounds checking. @@ -60,7 +60,7 @@ String String::substring(int start, int length) const StringView String::substring_view(int start, int length) const { if (!length) - return { }; + return {}; ASSERT(m_impl); ASSERT(start + length <= m_impl->length()); // FIXME: This needs some input bounds checking. @@ -70,7 +70,7 @@ StringView String::substring_view(int start, int length) const Vector<String> String::split(const char separator) const { if (is_empty()) - return { }; + return {}; Vector<String> v; ssize_t substart = 0; @@ -94,7 +94,7 @@ Vector<String> String::split(const char separator) const Vector<StringView> String::split_view(const char separator) const { if (is_empty()) - return { }; + return {}; Vector<StringView> v; ssize_t substart = 0; @@ -232,7 +232,7 @@ bool String::match_helper(const String& mask) const if (!*++mask_ptr) return true; mp = mask_ptr; - cp = string_ptr+1; + cp = string_ptr + 1; } else if ((*mask_ptr == *string_ptr) || (*mask_ptr == '?')) { mask_ptr++; string_ptr++; |