* Get some number that is suitable for string size computations. * @param max_value The biggest value which shall be displayed. * For the result only the number of digits of \a max_value matter. * @param min_count Minimum number of digits independent of \a max. * @param size Font of the number * @returns Number to use for string size computations. */
| 234 | * @returns Number to use for string size computations. |
| 235 | */ |
| 236 | uint64_t GetParamMaxValue(uint64_t max_value, uint min_count, FontSize size) |
| 237 | { |
| 238 | uint num_digits = 1; |
| 239 | while (max_value >= 10) { |
| 240 | num_digits++; |
| 241 | max_value /= 10; |
| 242 | } |
| 243 | return GetParamMaxDigits(std::max(min_count, num_digits), size); |
| 244 | } |
| 245 | |
| 246 | static void StationGetSpecialString(StringBuilder &builder, StationFacilities x); |
| 247 | static bool GetSpecialNameString(StringBuilder &builder, StringID string, StringParameters &args); |
no test coverage detected