| 45 | } |
| 46 | |
| 47 | std::string FormatFloat(float value, int precision) { |
| 48 | std::ostringstream oss; |
| 49 | if (precision == 0 && value == static_cast<int>(value)) { |
| 50 | oss << static_cast<int>(value); |
| 51 | } else { |
| 52 | oss << std::fixed << std::setprecision(precision) << value; |
| 53 | } |
| 54 | return oss.str(); |
| 55 | } |
| 56 | |
| 57 | void AddElement(tinyxml2::XMLElement* parent, const std::string& name, const std::string& value) { |
| 58 | tinyxml2::XMLDocument* doc = parent->GetDocument(); |
no outgoing calls
no test coverage detected