| 166 | } |
| 167 | |
| 168 | inline std::string fixFormatFloat(const float x, const int length) { |
| 169 | auto y = std::abs(x); |
| 170 | if (y < 10) { |
| 171 | return formatFloat(x, length - 1); |
| 172 | } else if (y < 100) { |
| 173 | return formatFloat(x, length - 2); |
| 174 | } else if (y < 1000) { |
| 175 | return formatFloat(x, length - 3); |
| 176 | } else if (y < 10000) { |
| 177 | return formatFloat(x, length - 4); |
| 178 | } else { |
| 179 | return formatFloat(x, length - 5); |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | class UIBase { |
| 184 | public: |
nothing calls this directly
no test coverage detected