From 8ba184db6a0cd3aea41c9a19c90a063a122c556d Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 27 Jun 2018 14:59:46 -0700 Subject: [PATCH] Don't use flags; use a bool --- interface/src/ui/OverlayConductor.cpp | 10 +++++----- interface/src/ui/OverlayConductor.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/src/ui/OverlayConductor.cpp b/interface/src/ui/OverlayConductor.cpp index a779ef8d1e..06f60ec6ed 100644 --- a/interface/src/ui/OverlayConductor.cpp +++ b/interface/src/ui/OverlayConductor.cpp @@ -93,22 +93,22 @@ void OverlayConductor::update(float dt) { bool shouldRecenter = false; - if (_flags & SuppressedByHead) { + if (_suppressedByHead) { if (isAtRest) { - _flags &= ~SuppressedByHead; + _suppressedByHead = false; shouldRecenter = true; } } else { if (_hmdMode && headOutsideOverlay()) { - _flags |= SuppressedByHead; + _suppressedByHead = true; } } - bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && (0 == (_flags & SuppressedByHead)); + bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && !_suppressedByHead; if (targetVisible != currentVisible) { offscreenUi->setPinned(!targetVisible); } - if (shouldRecenter && !_flags) { + if (shouldRecenter && !_suppressedByHead) { centerUI(); } } diff --git a/interface/src/ui/OverlayConductor.h b/interface/src/ui/OverlayConductor.h index 60809bcf33..ffbb2da431 100644 --- a/interface/src/ui/OverlayConductor.h +++ b/interface/src/ui/OverlayConductor.h @@ -29,7 +29,7 @@ private: SuppressedByHead = 0x01 }; - uint8_t _flags { SuppressedByHead }; + bool _suppressedByHead { false }; bool _hmdMode { false }; // used by updateAvatarIsAtRest