From 3c22041ee8dd450ce446620eb559a07e34f44343 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 30 Aug 2021 13:57:52 +0100 Subject: Add -Wpedantic --- lib/compileTimeFormatter.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/compileTimeFormatter.h') diff --git a/lib/compileTimeFormatter.h b/lib/compileTimeFormatter.h index 7d69d4b..341e229 100644 --- a/lib/compileTimeFormatter.h +++ b/lib/compileTimeFormatter.h @@ -99,15 +99,15 @@ namespace MyGrate { } }; -#define StreamWriterT(C...) \ +#define StreamWriterT(...) \ template \ - struct StreamWriter : \ - public StreamWriterBase + struct StreamWriter : \ + public StreamWriterBase -#define StreamWriterTP(P, C...) \ +#define StreamWriterTP(P, ...) \ template \ - struct StreamWriter : \ - public StreamWriterBase + struct StreamWriter : \ + public StreamWriterBase // Default stream writer formatter StreamWriterT('?') { @@ -300,7 +300,7 @@ namespace MyGrate { BASICCONV(BASE, OP, CONV); \ BASICCONV(short BASE, OP, 'h', CONV); \ BASICCONV(long BASE, OP, 'l', CONV); \ - BASICCONV(long long BASE, OP, 'l', 'l', CONV); + BASICCONV(long long BASE, OP, 'l', 'l', CONV) INTCONV(int, s << std::dec << p, 'i'); INTCONV(int, s << std::dec << p, 'd'); INTCONV(unsigned int, s << std::oct << p, 'o'); @@ -323,7 +323,7 @@ namespace MyGrate { // Floating point (a, A, e, E, f, F, g, G) #define FPCONV(BASE, OP, CONV) \ BASICCONV(BASE, OP, CONV); \ - BASICCONV(long BASE, OP, 'L', CONV); + BASICCONV(long BASE, OP, 'L', CONV) FPCONV(double, s << std::nouppercase << std::hexfloat << p, 'a'); FPCONV(double, s << std::uppercase << std::hexfloat << p, 'A'); FPCONV(double, s << std::nouppercase << std::scientific << p, 'e'); @@ -415,7 +415,7 @@ namespace MyGrate { StreamWriter::write(s, pn...); \ } \ }; - BOOST_PP_REPEAT(6, FMTWIDTH, void); + BOOST_PP_REPEAT(6, FMTWIDTH, void) #define FMTPRECISION(unused, d, data) \ template \ @@ -431,7 +431,7 @@ namespace MyGrate { StreamWriter::write(s, pn...); \ } \ }; - BOOST_PP_REPEAT(6, FMTPRECISION, void); + BOOST_PP_REPEAT(6, FMTPRECISION, void) #undef AUTON #undef NS #undef ISDIGIT @@ -467,7 +467,7 @@ namespace MyGrate { OP; \ StreamWriter::write(s, pn...); \ } \ - }; + } FLAGCONV(s << std::showbase, '#'); FLAGCONV(s << std::setfill('0'), '0'); FLAGCONV(s << std::left, '-'); -- cgit v1.2.3