Removed unnused parameter to value_t::print
This commit is contained in:
parent
c4f4e6b5be
commit
432be9e989
3 changed files with 11 additions and 23 deletions
|
|
@ -225,16 +225,13 @@ value_t report_t::fn_truncated(call_scope_t& scope)
|
||||||
|
|
||||||
value_t report_t::fn_justify(call_scope_t& scope)
|
value_t report_t::fn_justify(call_scope_t& scope)
|
||||||
{
|
{
|
||||||
interactive_t args(scope, "vl&lbbs");
|
interactive_t args(scope, "vl&lbb");
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
args.value_at(0)
|
args.value_at(0)
|
||||||
.print(out, args.get<int>(1),
|
.print(out, args.get<int>(1),
|
||||||
args.has(2) ? args.get<int>(2) : -1,
|
args.has(2) ? args.get<int>(2) : -1,
|
||||||
args.has(3) ? args.get<bool>(3) : false,
|
args.has(3) ? args.get<bool>(3) : false,
|
||||||
args.has(4) ? args.get<bool>(4) : false,
|
args.has(4) ? args.get<bool>(4) : false);
|
||||||
args.has(5) ? args.get<string>(5) :
|
|
||||||
(HANDLED(date_format_) ?
|
|
||||||
HANDLER(date_format_).str() : optional<string>()));
|
|
||||||
return string_value(out.str());
|
return string_value(out.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
24
src/value.cc
24
src/value.cc
|
|
@ -1497,12 +1497,11 @@ value_t value_t::strip_annotations(const keep_details_t& what_to_keep) const
|
||||||
return NULL_VALUE;
|
return NULL_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void value_t::print(std::ostream& out,
|
void value_t::print(std::ostream& out,
|
||||||
const int first_width,
|
const int first_width,
|
||||||
const int latter_width,
|
const int latter_width,
|
||||||
const bool right_justify,
|
const bool right_justify,
|
||||||
const bool colorize,
|
const bool colorize) const
|
||||||
const optional<string>& date_format) const
|
|
||||||
{
|
{
|
||||||
if (first_width > 0 &&
|
if (first_width > 0 &&
|
||||||
(! is_amount() || as_amount().is_zero()) &&
|
(! is_amount() || as_amount().is_zero()) &&
|
||||||
|
|
@ -1525,18 +1524,11 @@ void value_t::print(std::ostream& out,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DATETIME:
|
case DATETIME:
|
||||||
if (date_format)
|
out << format_datetime(as_datetime(), FMT_WRITTEN);
|
||||||
out << format_datetime(as_datetime(), FMT_CUSTOM,
|
|
||||||
date_format->c_str());
|
|
||||||
else
|
|
||||||
out << format_datetime(as_datetime(), FMT_WRITTEN);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DATE:
|
case DATE:
|
||||||
if (date_format)
|
out << format_date(as_date(), FMT_WRITTEN);
|
||||||
out << format_date(as_date(), FMT_CUSTOM, date_format->c_str());
|
|
||||||
else
|
|
||||||
out << format_date(as_date(), FMT_WRITTEN);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INTEGER:
|
case INTEGER:
|
||||||
|
|
@ -1581,7 +1573,7 @@ void value_t::print(std::ostream& out,
|
||||||
out << ", ";
|
out << ", ";
|
||||||
|
|
||||||
value.print(out, first_width, latter_width, right_justify,
|
value.print(out, first_width, latter_width, right_justify,
|
||||||
colorize, date_format);
|
colorize);
|
||||||
}
|
}
|
||||||
out << ')';
|
out << ')';
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -927,8 +927,7 @@ public:
|
||||||
const int first_width = -1,
|
const int first_width = -1,
|
||||||
const int latter_width = -1,
|
const int latter_width = -1,
|
||||||
const bool right_justify = false,
|
const bool right_justify = false,
|
||||||
const bool colorize = false,
|
const bool colorize = false) const;
|
||||||
const optional<string>& date_format = none) const;
|
|
||||||
void dump(std::ostream& out, const bool relaxed = true) const;
|
void dump(std::ostream& out, const bool relaxed = true) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue