Fix a compilation issue with older compilers

This commit is contained in:
Michał Janiszewski 2018-01-01 22:55:00 +01:00 committed by GitHub
parent 1cd7f99d2d
commit b1a78c8f24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -8060,7 +8060,9 @@ sint32 get_booster_speed(uint8 rideType, sint32 rawSpeed)
}
else
{
return (rawSpeed >> std::abs(shiftFactor));
// Workaround for an issue with older compilers (GCC 6, Clang 4) which would fail the build
sint8 shiftFactorAbs = std::abs(shiftFactor);
return (rawSpeed >> shiftFactorAbs);
}
}