mirror of
https://github.com/gabime/spdlog.git
synced 2026-04-10 11:34:29 +08:00
Fix clang-tidy warnings about missing braces around if and for statements
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user