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:
Derek Bankieris 2015-11-17 14:18:59 -06:00
parent 2f5c219f98
commit aedd6b2be3

View File

@ -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: