diff --git a/format.h b/format.h index 604fee71..935434b3 100644 --- a/format.h +++ b/format.h @@ -409,8 +409,8 @@ class StrFormatSpec : public AlignSpec { const T *str_; public: - StrFormatSpec(const T *str, const AlignSpec &spec) - : AlignSpec(spec), str_(str) {} + StrFormatSpec(const T *str, unsigned width, wchar_t fill) + : AlignSpec(width, fill), str_(str) {} const T *str() const { return str_; } }; @@ -507,12 +507,12 @@ DEFINE_INT_FORMATTERS(unsigned long long) template inline StrFormatSpec pad( const Char *str, unsigned width, Char fill = ' ') { - return StrFormatSpec(str, AlignSpec(width, fill)); + return StrFormatSpec(str, width, fill); } inline StrFormatSpec pad( const wchar_t *str, unsigned width, char fill = ' ') { - return StrFormatSpec(str, AlignSpec(width, fill)); + return StrFormatSpec(str, width, fill); } template