Normalized copyright message

This commit is contained in:
gabime
2019-05-11 20:15:03 +03:00
parent 46ef71e3ec
commit 540f865355
3 changed files with 32 additions and 18 deletions

View File

@@ -1,4 +1,23 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
#pragma once
SPDLOG_INLINE spdlog::spdlog_ex::spdlog_ex(std::string msg)
: msg_(std::move(msg))
{
}
SPDLOG_INLINE spdlog::spdlog_ex::spdlog_ex(const std::string &msg, int last_errno)
{
fmt::memory_buffer outbuf;
fmt::format_system_error(outbuf, last_errno, msg);
msg_ = fmt::to_string(outbuf);
}
SPDLOG_INLINE const char *spdlog::spdlog_ex::what() const SPDLOG_NOEXCEPT
{
return msg_.c_str();
}