From a3e05332b02cd3a40904283333a717e32550b01f Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 12 Jan 2024 15:52:32 +0200 Subject: [PATCH] Removed fmt wrapper files --- CMakeLists.txt | 6 ------ example/example.cpp | 2 +- include/spdlog/fmt/chrono.h | 14 -------------- include/spdlog/fmt/compile.h | 14 -------------- include/spdlog/fmt/fmt.h | 3 +-- include/spdlog/fmt/ostr.h | 14 -------------- include/spdlog/fmt/ranges.h | 14 -------------- include/spdlog/fmt/std.h | 15 --------------- include/spdlog/fmt/xchar.h | 14 -------------- include/spdlog/sinks/daily_file_sink.h | 3 +-- src/sinks/rotating_file_sink.cpp | 2 +- 11 files changed, 4 insertions(+), 97 deletions(-) delete mode 100644 include/spdlog/fmt/chrono.h delete mode 100644 include/spdlog/fmt/compile.h delete mode 100644 include/spdlog/fmt/ostr.h delete mode 100644 include/spdlog/fmt/ranges.h delete mode 100644 include/spdlog/fmt/std.h delete mode 100644 include/spdlog/fmt/xchar.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 13d32822..b1f9e0bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,13 +199,7 @@ set(SPDLOG_HEADERS "include/spdlog/details/udp_client.h" "include/spdlog/details/windows_include.h" "include/spdlog/fmt/bin_to_hex.h" - "include/spdlog/fmt/chrono.h" - "include/spdlog/fmt/compile.h" "include/spdlog/fmt/fmt.h" - "include/spdlog/fmt/ostr.h" - "include/spdlog/fmt/ranges.h" - "include/spdlog/fmt/std.h" - "include/spdlog/fmt/xchar.h" "include/spdlog/sinks/android_sink.h" "include/spdlog/sinks/ansicolor_sink.h" "include/spdlog/sinks/base_sink.h" diff --git a/example/example.cpp b/example/example.cpp index a1a0b1c3..67674a9f 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -194,7 +194,7 @@ void binary_example() { // Log a vector of numbers #ifndef SPDLOG_USE_STD_FORMAT - #include "spdlog/fmt/ranges.h" + #include "fmt/ranges.h" void vector_example() { std::vector vec = {1, 2, 3}; spdlog::info("Vector example: {}", vec); diff --git a/include/spdlog/fmt/chrono.h b/include/spdlog/fmt/chrono.h deleted file mode 100644 index 845815a3..00000000 --- a/include/spdlog/fmt/chrono.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright(c) 2016 Gabi Melman. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) -// - -#pragma once -// -// include bundled or external copy of fmtlib's chrono support -// -#include - -#if !defined(SPDLOG_USE_STD_FORMAT) - #include -#endif diff --git a/include/spdlog/fmt/compile.h b/include/spdlog/fmt/compile.h deleted file mode 100644 index 7b95d8e1..00000000 --- a/include/spdlog/fmt/compile.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright(c) 2016 Gabi Melman. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) -// - -#pragma once -// -// include bundled or external copy of fmtlib's compile-time support -// -#include - -#if !defined(SPDLOG_USE_STD_FORMAT) - #include -#endif diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h index 6d47a65a..0932872f 100644 --- a/include/spdlog/fmt/fmt.h +++ b/include/spdlog/fmt/fmt.h @@ -14,6 +14,5 @@ #if defined(SPDLOG_USE_STD_FORMAT) // use std::format #include #else - #include - #include + #include "fmt/format.h" #endif diff --git a/include/spdlog/fmt/ostr.h b/include/spdlog/fmt/ostr.h deleted file mode 100644 index 71294ffc..00000000 --- a/include/spdlog/fmt/ostr.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright(c) 2016 Gabi Melman. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) -// - -#pragma once -// -// include bundled or external copy of fmtlib's ostream support -// -#include - -#if !defined(SPDLOG_USE_STD_FORMAT) - #include -#endif diff --git a/include/spdlog/fmt/ranges.h b/include/spdlog/fmt/ranges.h deleted file mode 100644 index 68c05c25..00000000 --- a/include/spdlog/fmt/ranges.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright(c) 2016 Gabi Melman. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) -// - -#pragma once -// -// include bundled or external copy of fmtlib's ranges support -// -#include - -#if !defined(SPDLOG_USE_STD_FORMAT) - #include -#endif diff --git a/include/spdlog/fmt/std.h b/include/spdlog/fmt/std.h deleted file mode 100644 index 088fe0ef..00000000 --- a/include/spdlog/fmt/std.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Copyright(c) 2016 Gabi Melman. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) -// - -#pragma once -// -// include bundled or external copy of fmtlib's std support (for formatting e.g. -// std::filesystem::path, std::thread::id, std::monostate, std::variant, ...) -// -#include - -#if !defined(SPDLOG_USE_STD_FORMAT) - #include -#endif diff --git a/include/spdlog/fmt/xchar.h b/include/spdlog/fmt/xchar.h deleted file mode 100644 index c0aee6cd..00000000 --- a/include/spdlog/fmt/xchar.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright(c) 2016 Gabi Melman. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) -// - -#pragma once -// -// include bundled or external copy of fmtlib's xchar support -// -#include - -#if !defined(SPDLOG_USE_STD_FORMAT) - #include -#endif diff --git a/include/spdlog/sinks/daily_file_sink.h b/include/spdlog/sinks/daily_file_sink.h index 2a888543..cc4fec03 100644 --- a/include/spdlog/sinks/daily_file_sink.h +++ b/include/spdlog/sinks/daily_file_sink.h @@ -16,8 +16,7 @@ #include "../details/null_mutex.h" #include "../details/os.h" #include "../details/synchronous_factory.h" -#include "../fmt/chrono.h" -#include "../fmt/fmt.h" +#include "fmt/chrono.h" #include "base_sink.h" namespace spdlog { diff --git a/src/sinks/rotating_file_sink.cpp b/src/sinks/rotating_file_sink.cpp index 3637ebe6..8d92434d 100644 --- a/src/sinks/rotating_file_sink.cpp +++ b/src/sinks/rotating_file_sink.cpp @@ -11,7 +11,7 @@ #include "spdlog/common.h" #include "spdlog/details/file_helper.h" #include "spdlog/details/os.h" -#include "spdlog/fmt/fmt.h" +//#include "spdlog/fmt/fmt.h" namespace spdlog { namespace sinks {