spec -> specs

This commit is contained in:
Victor Zverovich
2019-07-07 06:39:20 -07:00
parent e4f84ee1c6
commit 5488d0b53a
6 changed files with 138 additions and 150 deletions
+3 -3
View File
@@ -572,8 +572,8 @@ class custom_printf_arg_formatter : public formatter_t {
using formatter_t::iterator;
custom_printf_arg_formatter(formatter_t::iterator iter,
formatter_t::format_specs& spec, context_t& ctx)
: formatter_t(iter, spec, ctx) {}
formatter_t::format_specs& specs, context_t& ctx)
: formatter_t(iter, specs, ctx) {}
using formatter_t::operator();
@@ -584,7 +584,7 @@ class custom_printf_arg_formatter : public formatter_t {
iterator operator()(double value) {
#endif
// Comparing a float to 0.0 is safe.
if (round(value * pow(10, spec()->precision)) == 0.0) value = 0;
if (round(value * pow(10, specs()->precision)) == 0.0) value = 0;
return formatter_t::operator()(value);
}
}