Clang format

This commit is contained in:
gabime
2023-09-24 20:43:14 +03:00
parent 5654205d6b
commit e28eadcd52
38 changed files with 326 additions and 356 deletions

View File

@@ -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)));
}