| 295 | } |
| 296 | |
| 297 | int GeneralUtils::SafeMultiply(int value, int mult) |
| 298 | { |
| 299 | long long product = static_cast<long long>(value) * mult; |
| 300 | |
| 301 | if (product > INT32_MAX) |
| 302 | product = INT32_MAX; |
| 303 | else if (product < INT32_MIN) |
| 304 | product = INT32_MIN; |
| 305 | |
| 306 | return static_cast<int>(product); |
| 307 | } |
| 308 | |
| 309 | int GeneralUtils::SafeMultiply(int value, double mult) |
| 310 | { |
nothing calls this directly
no outgoing calls
no test coverage detected