From 99a4e523b81a0e5e53f9133bff6e1dcb1d3c251b Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 17 Mar 2017 23:30:09 -0700 Subject: [PATCH] fixup! fixup! fixup! fixup! ircd: Add the va_rtti construct. --- include/ircd/fmt.h | 15 +++++++++++---- ircd/fmt.cc | 10 ---------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/include/ircd/fmt.h b/include/ircd/fmt.h index c85c85100..5b759401d 100644 --- a/include/ircd/fmt.h +++ b/include/ircd/fmt.h @@ -33,16 +33,23 @@ IRCD_EXCEPTION(error, illegal); // // Module API // -extern const char SPECIFIER; -extern const char SPECIFIER_TERMINATOR; +constexpr char SPECIFIER +{ + '%' +}; + +constexpr char SPECIFIER_TERMINATOR +{ + '$' +}; using arg = std::tuple; // Structural representation of a format specifier struct spec { - char sign = '+'; - int width = 0; + char sign {'+'}; + int width {0}; string_view name; spec() = default; diff --git a/ircd/fmt.cc b/ircd/fmt.cc index 07d4ed462..b48c53d9f 100644 --- a/ircd/fmt.cc +++ b/ircd/fmt.cc @@ -46,16 +46,6 @@ using qi::repeat; using qi::omit; using qi::unused_type; -const char SPECIFIER -{ - '%' -}; - -const char SPECIFIER_TERMINATOR -{ - '$' -}; - std::map _specifiers; bool is_specifier(const string_view &name);