diff options
| author | 2020-11-15 14:18:09 -0500 | |
|---|---|---|
| committer | 2020-11-15 14:18:09 -0500 | |
| commit | cb826bcee74c393f5f13856bebfb9cb60ba51851 (patch) | |
| tree | 9ac33d0fc8abc64acb621de6972d901ab44c76c6 | |
| parent | Merge pull request #4910 from lioncash/service (diff) | |
| download | yuzu-cb826bcee74c393f5f13856bebfb9cb60ba51851.tar.gz yuzu-cb826bcee74c393f5f13856bebfb9cb60ba51851.tar.xz yuzu-cb826bcee74c393f5f13856bebfb9cb60ba51851.zip | |
motion_input: Mark member functions as [[nodiscard]] where applicable
Diffstat (limited to '')
| -rw-r--r-- | src/input_common/motion_input.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/input_common/motion_input.h b/src/input_common/motion_input.h index abb957f04..ce7ab7f9b 100644 --- a/src/input_common/motion_input.h +++ b/src/input_common/motion_input.h | |||
| @@ -33,16 +33,17 @@ public: | |||
| 33 | void UpdateRotation(u64 elapsed_time); | 33 | void UpdateRotation(u64 elapsed_time); |
| 34 | void UpdateOrientation(u64 elapsed_time); | 34 | void UpdateOrientation(u64 elapsed_time); |
| 35 | 35 | ||
| 36 | std::array<Common::Vec3f, 3> GetOrientation() const; | 36 | [[nodiscard]] std::array<Common::Vec3f, 3> GetOrientation() const; |
| 37 | Common::Vec3f GetAcceleration() const; | 37 | [[nodiscard]] Common::Vec3f GetAcceleration() const; |
| 38 | Common::Vec3f GetGyroscope() const; | 38 | [[nodiscard]] Common::Vec3f GetGyroscope() const; |
| 39 | Common::Vec3f GetRotations() const; | 39 | [[nodiscard]] Common::Vec3f GetRotations() const; |
| 40 | Common::Quaternion<f32> GetQuaternion() const; | 40 | [[nodiscard]] Common::Quaternion<f32> GetQuaternion() const; |
| 41 | Input::MotionStatus GetMotion() const; | 41 | [[nodiscard]] Input::MotionStatus GetMotion() const; |
| 42 | Input::MotionStatus GetRandomMotion(int accel_magnitude, int gyro_magnitude) const; | 42 | [[nodiscard]] Input::MotionStatus GetRandomMotion(int accel_magnitude, |
| 43 | 43 | int gyro_magnitude) const; | |
| 44 | bool IsMoving(f32 sensitivity) const; | 44 | |
| 45 | bool IsCalibrated(f32 sensitivity) const; | 45 | [[nodiscard]] bool IsMoving(f32 sensitivity) const; |
| 46 | [[nodiscard]] bool IsCalibrated(f32 sensitivity) const; | ||
| 46 | 47 | ||
| 47 | private: | 48 | private: |
| 48 | void ResetOrientation(); | 49 | void ResetOrientation(); |