X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fstrings%2Ffmt.h;h=45ae91749c5e3b51ae19b1ebc4dbec8d1627f4d5;hb=991fabc1956b73a4007859058fb44171000b452e;hp=ee84911bcec06fcd0fc34402ef8975133235b3ce;hpb=71be32fe7248a7d2df7dea4e18c5ebd30fd73d4b;p=libs%2Fcore.git diff --git a/source/strings/fmt.h b/source/strings/fmt.h index ee84911..45ae917 100644 --- a/source/strings/fmt.h +++ b/source/strings/fmt.h @@ -11,7 +11,7 @@ class format_error: public std::logic_error { public: format_error(const std::string &w): std::logic_error(w) { } - virtual ~format_error() throw() { } + ~format_error() throw() override = default; }; @@ -68,22 +68,22 @@ public: }; private: - unsigned wd; - unsigned prec; - bool spos; - wchar_t fillc; - Base base; - bool sbase; - FloatMode fmode; - bool spoint; - Align align; - bool ucase; - Type type; + unsigned wd = 0; + unsigned prec = 6; + bool spos = false; + wchar_t fillc = ' '; + Base base = DEC; + bool sbase = false; + FloatMode fmode = AUTOFLT; + bool spoint = false; + Align align = RIGHT; + bool ucase = false; + Type type = STR; public: - Fmt() { reset(); } - Fmt(const char *f) { reset(); parse(f); } - Fmt(const std::string &f) { reset(); parse(f.c_str()); } + Fmt() = default; + Fmt(const char *f) { parse(f); } + Fmt(const std::string &f) { parse(f.c_str()); } private: void parse(const char *);