diff --git a/fmt/format.cc b/fmt/format.cc index a22a3a45..80c7b4e7 100644 --- a/fmt/format.cc +++ b/fmt/format.cc @@ -26,7 +26,7 @@ */ #include "fmt/format.h" -#include "printf.h" +#include "fmt/printf.h" #include @@ -38,8 +38,6 @@ namespace fmt { - - namespace internal { // This method is used to preserve binary compatibility with fmt 3.0. @@ -313,10 +311,6 @@ FMT_FUNC void fmt::print_colored(Color c, CStringRef format, ArgList args) { } - - - - #ifndef FMT_HEADER_ONLY template struct fmt::internal::BasicData; @@ -327,7 +321,6 @@ template void fmt::internal::FixedBuffer::grow(std::size_t); template void fmt::internal::ArgMap::init(const fmt::ArgList &args); - template int fmt::internal::CharTraits::format_float( char *buffer, std::size_t size, const char *format, unsigned width, int precision, double value); @@ -342,7 +335,6 @@ template void fmt::internal::FixedBuffer::grow(std::size_t); template void fmt::internal::ArgMap::init(const fmt::ArgList &args); - template int fmt::internal::CharTraits::format_float( wchar_t *buffer, std::size_t size, const wchar_t *format, unsigned width, int precision, double value); diff --git a/fmt/format.h b/fmt/format.h index 6a4f6099..0fc275a4 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -1987,7 +1987,7 @@ class FormatterBase { */ template class BasicArgFormatter : public internal::ArgFormatterBase { -private: + private: BasicFormatter &formatter_; const Char *format_; diff --git a/fmt/printf.h b/fmt/printf.h index 3ef41037..8c75728c 100644 --- a/fmt/printf.h +++ b/fmt/printf.h @@ -33,7 +33,7 @@ #include #include -#include //< Only for windows? +#include #if defined(_WIN32) && defined(__MINGW32__) @@ -81,12 +81,6 @@ static inline fmt::internal::Null<> strerror_s(char *, std::size_t, ...) { namespace fmt { namespace internal { -// template class DefaultPrintfArgFormatter; - -// template > -// class PrintfFormatter; - template class PrintfArgFormatter : public internal::ArgFormatterBase { diff --git a/test/custom-formatter-test.cc b/test/custom-formatter-test.cc index e3fc83a0..e8f87490 100644 --- a/test/custom-formatter-test.cc +++ b/test/custom-formatter-test.cc @@ -29,9 +29,6 @@ #include "fmt/printf.h" #include "gtest-extra.h" -#include - - // A custom argument formatter that doesn't print `-` for floating-point values // rounded to 0. class CustomArgFormatter : @@ -83,15 +80,6 @@ std::string printfer(const char* fstr, fmt::ArgList args){ FMT_VARIADIC(std::string, printfer, const char*); - -// Makes format string argument positional. -std::string make_positional(fmt::StringRef format) { - std::string s(format.to_string()); - s.replace(s.find('%'), 1, "%1$"); - return s; -} - - TEST(custom, foo){ EXPECT_EQ("0.00", custom_format("{:.2f}", -.00001)); EXPECT_EQ("0.00", printfer("%.2f", -.00001));