]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
refactor: Remove no longer needed FMT_STRING master
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 3 Feb 2026 19:27:01 +0000 (20:27 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 3 Feb 2026 19:27:01 +0000 (20:27 +0100)
fmt checks format arguments without the need of FMT_STRING when using
C++20.

src/ccache/util/format.hpp
src/ccache/util/logging.hpp

index 613ac4789b757bc10ba55cec5d786b9b953c982d..eea6f27fa6a3304ee50a4fe62a2baaefa9dd1e72 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2024 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2026 Joel Rosdahl and other contributors
 //
 // See doc/authors.adoc for a complete list of contributors.
 //
 #include <string_view>
 #include <system_error>
 
-// Convenience macro for calling `fmt::format` with `FMT_STRING` around the
-// format string literal.
-#define FMT(format_, ...) fmt::format(FMT_STRING(format_), __VA_ARGS__)
+// Convenience macro for `fmt::format`.
+#define FMT(format_, ...) fmt::format(format_, __VA_ARGS__)
 
-// Convenience macro for calling `fmt::print` with `FMT_STRING` around the
-// format string literal.
-#define PRINT(stream_, format_, ...)                                           \
-  fmt::print(stream_, FMT_STRING(format_), __VA_ARGS__)
+// Convenience macro for `fmt::print`.
+#define PRINT(stream_, format_, ...) fmt::print(stream_, format_, __VA_ARGS__)
 
 // Convenience macro for calling `fmt::print` with a message that is not a
 // format string.
index a455d126dc991dc409efcc0e5fbd361ccdbf7f18..5c1e5a77fbdc5933a82b05ae70d929157e727343 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2020-2025 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2026 Joel Rosdahl and other contributors
 //
 // See doc/authors.adoc for a complete list of contributors.
 //
   } while (false)
 
 // Log a message (plus a newline character) described by a format string with at
-// least one placeholder. `format` is checked at compile time.
-#define LOG(format_, ...) LOG_RAW(fmt::format(FMT_STRING(format_), __VA_ARGS__))
+// least one placeholder.
+#define LOG(format_, ...) LOG_RAW(fmt::format(format_, __VA_ARGS__))
 
 // Log a message (plus a newline character) described by a format string with at
-// least one placeholder without flushing and with a reused timestamp. `format`
-// is checked at compile time.
+// least one placeholder without flushing and with a reused timestamp.
 #define BULK_LOG(logger_, format_, ...)                                        \
-  logger_.log(fmt::format(FMT_STRING(format_), __VA_ARGS__))
+  logger_.log(fmt::format(format_, __VA_ARGS__))
 
 namespace util::logging {