mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-13 17:22:06 +08:00
Fixed some tidy warnings
This commit is contained in:
parent
8acf96659f
commit
1fcdd8c021
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <chrono>
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@ -107,7 +106,7 @@ constexpr std::array<std::string_view, levels_count> short_level_names{"T", "D",
|
|||||||
return level_string_views.at(level_to_number(lvl));
|
return level_string_views.at(level_to_number(lvl));
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] constexpr const std::string_view to_short_string_view(spdlog::level lvl) noexcept {
|
[[nodiscard]] constexpr std::string_view to_short_string_view(spdlog::level lvl) noexcept {
|
||||||
return short_level_names.at(level_to_number(lvl));
|
return short_level_names.at(level_to_number(lvl));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,12 +160,11 @@ struct file_event_handlers {
|
|||||||
namespace details {
|
namespace details {
|
||||||
|
|
||||||
// to_string_view
|
// to_string_view
|
||||||
|
|
||||||
[[nodiscard]] constexpr spdlog::string_view_t to_string_view(const memory_buf_t &buf) noexcept {
|
[[nodiscard]] constexpr spdlog::string_view_t to_string_view(const memory_buf_t &buf) noexcept {
|
||||||
return spdlog::string_view_t{buf.data(), buf.size()};
|
return spdlog::string_view_t{buf.data(), buf.size()};
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] constexpr spdlog::string_view_t to_string_view(spdlog::string_view_t str) noexcept { return str; }
|
//[[nodiscard]] constexpr spdlog::string_view_t to_string_view(spdlog::string_view_t str) noexcept { return str; }
|
||||||
|
|
||||||
template <typename T, typename... Args>
|
template <typename T, typename... Args>
|
||||||
[[nodiscard]] constexpr fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) noexcept {
|
[[nodiscard]] constexpr fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) noexcept {
|
||||||
|
Loading…
Reference in New Issue
Block a user