untmpstring
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
7fadb5fb46
commit
e7beb14800
|
|
@ -253,10 +253,8 @@ ReportPath::setDigits(int digits)
|
||||||
{
|
{
|
||||||
digits_ = digits;
|
digits_ = digits;
|
||||||
|
|
||||||
if (plus_zero_) {
|
stringDelete(plus_zero_);
|
||||||
stringDelete(plus_zero_);
|
stringDelete(minus_zero_);
|
||||||
stringDelete(minus_zero_);
|
|
||||||
}
|
|
||||||
minus_zero_ = stringPrint("-%.*f", digits_, 0.0);
|
minus_zero_ = stringPrint("-%.*f", digits_, 0.0);
|
||||||
plus_zero_ = stringPrint("%.*f", digits_, 0.0);
|
plus_zero_ = stringPrint("%.*f", digits_, 0.0);
|
||||||
}
|
}
|
||||||
|
|
@ -3164,11 +3162,16 @@ ReportPath::reportField(float value,
|
||||||
reportFieldBlank(field, line);
|
reportFieldBlank(field, line);
|
||||||
else {
|
else {
|
||||||
Unit *unit = field->unit();
|
Unit *unit = field->unit();
|
||||||
const char *value_str = (unit)
|
if (unit) {
|
||||||
? unit->asString(value, digits_)
|
const char *value_str = unit->asString(value, digits_);
|
||||||
|
reportField(value_str, field, line);
|
||||||
|
}
|
||||||
|
else {
|
||||||
// fanout
|
// fanout
|
||||||
: stringPrintTmp("%.0f", value);
|
string value_str;
|
||||||
reportField(value_str, field, line);
|
stringPrint(value_str, "%.0f", value);
|
||||||
|
reportField(value_str.c_str(), field, line);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue