Fix clang-tidy warnings about missing braces around if and for statements

This commit is contained in:
gabime
2018-03-17 13:42:09 +02:00
parent 7eb6ca6337
commit 200815892f
10 changed files with 118 additions and 0 deletions

View File

@@ -488,16 +488,24 @@ inline void spdlog::pattern_formatter::compile_pattern(const std::string &patter
if (*it == '%')
{
if (user_chars) // append user chars found so far
{
_formatters.push_back(std::move(user_chars));
}
if (++it != end)
{
handle_flag(*it);
}
else
{
break;
}
}
else // chars not following the % sign should be displayed as is
{
if (!user_chars)
{
user_chars = std::unique_ptr<details::aggregate_formatter>(new details::aggregate_formatter());
}
user_chars->add_ch(*it);
}
}