From 7e5680b2a6ecd1f9179f0e5e6f3ad63e62e1e132 Mon Sep 17 00:00:00 2001 From: Phil <35943148+Phil-Palmer@users.noreply.github.com> Date: Tue, 29 Dec 2020 18:25:17 -0500 Subject: [PATCH] Apply suggestions from code review Tidying (bracing style, spaces, remove final comma from enum, fix JSDoc comment). Co-authored-by: David Rowe --- interface/src/avatar/MyAvatar.cpp | 6 ++---- interface/src/avatar/MyAvatar.h | 9 ++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index a47cf088c6..1897b4e55b 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -5622,8 +5622,7 @@ void MyAvatar::FollowHelper::decrementTimeRemaining(float dt) { for (auto& time : _timeRemaining) { if (time == CharacterController::FOLLOW_TIME_IMMEDIATE_SNAP) { time = 0.0f; - } - else { + } else { time -= dt; } } @@ -5638,8 +5637,7 @@ bool MyAvatar::FollowHelper::shouldActivateRotation(const MyAvatar& myAvatar, if (myAvatar.areHipsTracked()) { shouldSnapOut = true; return true; - } - else { + } else { shouldSnapOut = false; } diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index 84913d0ad5..f424e3ba2c 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -282,7 +282,7 @@ class MyAvatar : public Avatar { *

Warning: Setting this value also sets the value of analogPlusSprintSpeed to twice * the value.

* @property {number} analogPlusSprintSpeed - The sprint (run) speed of your avatar for the "AnalogPlus" control scheme. - * @property {number} isInSittingState - true if the user wearing the HMD is determined to be sitting; + * @property {boolean} isInSittingState - true if the user wearing the HMD is determined to be sitting; * false if the user wearing the HMD is determined to be standing. This can affect whether the avatar * is allowed to stand, lean or recenter its footing, depending on user preferences. * The property value automatically updates as the user sits or stands. Setting the property value overrides the current @@ -543,12 +543,11 @@ public: Q_ENUM(SitStandModelType) // Note: The option strings in setupPreferences (PreferencesDialog.cpp) must match this order. - enum class AllowAvatarStandingPreference : uint - { + enum class AllowAvatarStandingPreference : uint { WhenUserIsStanding, Always, Count, - Default = Always, + Default = Always }; Q_ENUM(AllowAvatarStandingPreference) @@ -2732,7 +2731,7 @@ private: // Indicates which parts of the body are under direct control (tracked). struct { - bool _feet{ false }; // Left or right foot. + bool _feet { false }; // Left or right foot. bool _feetPreviousUpdate{ false };// Value of _feet on the previous update. bool _hips{ false }; bool _leftHand{ false };