Skip to content

Commit 4da03dd

Browse files
committed
GCC 12 :(
1 parent 59a4d9d commit 4da03dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wpimath/src/main/native/include/wpi/math/kinematics/SwerveModuleState.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace wpi::math {
1414
/**
1515
* Represents the state of one swerve module.
1616
*/
17-
struct [[nodiscard]] WPILIB_DLLEXPORT SwerveModuleState {
17+
struct WPILIB_DLLEXPORT SwerveModuleState {
1818
/**
1919
* Speed of the wheel of the module.
2020
*/
@@ -45,6 +45,7 @@ struct [[nodiscard]] WPILIB_DLLEXPORT SwerveModuleState {
4545
* @param currentAngle The current module angle.
4646
* @return The optimized module state.
4747
*/
48+
[[nodiscard]]
4849
constexpr SwerveModuleState Optimize(const Rotation2d& currentAngle) {
4950
auto delta = angle - currentAngle;
5051
if (wpi::units::math::abs(delta.Degrees()) > 90_deg) {
@@ -62,6 +63,7 @@ struct [[nodiscard]] WPILIB_DLLEXPORT SwerveModuleState {
6263
* @param currentAngle The current module angle.
6364
* @return The scaled module state.
6465
*/
66+
[[nodiscard]]
6567
constexpr SwerveModuleState CosineScale(const Rotation2d& currentAngle) {
6668
return {speed * (angle - currentAngle).Cos(), angle};
6769
}

0 commit comments

Comments
 (0)