mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
Clang format
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace spdlog {
|
||||
|
||||
spdlog::level level_from_str(const std::string &name) noexcept
|
||||
spdlog::level level_from_str(const std::string &name) noexcept
|
||||
{
|
||||
auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name);
|
||||
if (it != std::end(level_string_views))
|
||||
@@ -26,11 +26,11 @@ namespace spdlog {
|
||||
return level::off;
|
||||
}
|
||||
|
||||
spdlog_ex::spdlog_ex(std::string msg)
|
||||
spdlog_ex::spdlog_ex(std::string msg)
|
||||
: msg_(std::move(msg))
|
||||
{}
|
||||
|
||||
spdlog_ex::spdlog_ex(const std::string &msg, int last_errno)
|
||||
spdlog_ex::spdlog_ex(const std::string &msg, int last_errno)
|
||||
{
|
||||
#ifdef SPDLOG_USE_STD_FORMAT
|
||||
msg_ = std::system_error(std::error_code(last_errno, std::generic_category()), msg).what();
|
||||
@@ -41,17 +41,17 @@ namespace spdlog {
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *spdlog_ex::what() const noexcept
|
||||
const char *spdlog_ex::what() const noexcept
|
||||
{
|
||||
return msg_.c_str();
|
||||
}
|
||||
|
||||
void throw_spdlog_ex(const std::string &msg, int last_errno)
|
||||
void throw_spdlog_ex(const std::string &msg, int last_errno)
|
||||
{
|
||||
SPDLOG_THROW(spdlog_ex(msg, last_errno));
|
||||
}
|
||||
|
||||
void throw_spdlog_ex(std::string msg)
|
||||
void throw_spdlog_ex(std::string msg)
|
||||
{
|
||||
SPDLOG_THROW(spdlog_ex(std::move(msg)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user