mirror of
https://github.com/nasa/trick.git
synced 2025-02-06 10:59:27 +00:00
I'm not sure why we're padding floats and doubles in vs_format_ascii. It results in sending a bunch of useless spaces which hurts efficiency. Values are already tab-delimited, so fixed-width fields are unnecessary. We're not padding anything else, so don't pad these!
This commit is contained in:
parent
2f5c219f98
commit
aedd6b2be3
@ -137,11 +137,11 @@ int vs_format_ascii(Trick::VariableReference * var, char *value) {
|
||||
break;
|
||||
|
||||
case TRICK_FLOAT:
|
||||
sprintf(value, "%s%-14.8g", value, var->conversion_factor->eval(*(float *)buf_ptr));
|
||||
sprintf(value, "%s%.8g", value, var->conversion_factor->eval(*(float *)buf_ptr));
|
||||
break;
|
||||
|
||||
case TRICK_DOUBLE:
|
||||
sprintf(value, "%s%-21.16g", value, var->conversion_factor->eval(*(double *)buf_ptr));
|
||||
sprintf(value, "%s%.16g", value, var->conversion_factor->eval(*(double *)buf_ptr));
|
||||
break;
|
||||
|
||||
case TRICK_LONG_LONG:
|
||||
|
Loading…
x
Reference in New Issue
Block a user