mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
clang-format
This commit is contained in:
parent
c251c4ccbb
commit
92921f767e
@ -111,7 +111,7 @@ enum level_enum
|
|||||||
static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES;
|
static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES;
|
||||||
static const char *short_level_names[]{"T", "D", "I", "W", "E", "C", "O"};
|
static const char *short_level_names[]{"T", "D", "I", "W", "E", "C", "O"};
|
||||||
|
|
||||||
inline string_view_t& to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
|
inline string_view_t &to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
|
||||||
{
|
{
|
||||||
return level_string_views[l];
|
return level_string_views[l];
|
||||||
}
|
}
|
||||||
@ -124,9 +124,9 @@ inline const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
|
|||||||
inline spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT
|
inline spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT
|
||||||
{
|
{
|
||||||
int level = 0;
|
int level = 0;
|
||||||
for(const auto &level_str : level_string_views)
|
for (const auto &level_str : level_string_views)
|
||||||
{
|
{
|
||||||
if(level_str == name)
|
if (level_str == name)
|
||||||
{
|
{
|
||||||
return static_cast<level::level_enum>(level);
|
return static_cast<level::level_enum>(level);
|
||||||
}
|
}
|
||||||
@ -196,11 +196,11 @@ struct source_loc
|
|||||||
, line(line)
|
, line(line)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SPDLOG_CONSTEXPR bool empty() const SPDLOG_NOEXCEPT
|
SPDLOG_CONSTEXPR bool empty() const SPDLOG_NOEXCEPT
|
||||||
{
|
{
|
||||||
return line == 0;
|
return line == 0;
|
||||||
}
|
}
|
||||||
const char *filename;
|
const char *filename;
|
||||||
uint32_t line;
|
uint32_t line;
|
||||||
};
|
};
|
||||||
|
@ -356,7 +356,7 @@ public:
|
|||||||
|
|
||||||
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
|
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
|
||||||
{
|
{
|
||||||
const size_t field_size = 4;
|
const size_t field_size = 4;
|
||||||
scoped_pad p(field_size, padinfo_, dest);
|
scoped_pad p(field_size, padinfo_, dest);
|
||||||
fmt_helper::append_int(tm_time.tm_year + 1900, dest);
|
fmt_helper::append_int(tm_time.tm_year + 1900, dest);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user