diff --git a/Code/Sandbox/Editor/ViewportTitleDlg.cpp b/Code/Sandbox/Editor/ViewportTitleDlg.cpp index d7c8929540..5ccb83cd5b 100644 --- a/Code/Sandbox/Editor/ViewportTitleDlg.cpp +++ b/Code/Sandbox/Editor/ViewportTitleDlg.cpp @@ -187,8 +187,8 @@ void CViewportTitleDlg::OnToggleDisplayInfo() state, &AZ::AtomBridge::AtomViewportInfoDisplayRequestBus::Events::GetDisplayState ); - state = static_cast( - (static_cast(state)+1) % static_cast(AZ::AtomBridge::ViewportInfoDisplayState::Invalid)); + state = aznumeric_cast( + (aznumeric_cast(state)+1) % aznumeric_cast(AZ::AtomBridge::ViewportInfoDisplayState::Invalid)); // SetDisplayState will fire OnViewportInfoDisplayStateChanged and notify us, no need to call UpdateDisplayInfo. AZ::AtomBridge::AtomViewportInfoDisplayRequestBus::Broadcast( &AZ::AtomBridge::AtomViewportInfoDisplayRequestBus::Events::SetDisplayState, diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp index 11c727eeca..672c26a9ab 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp @@ -35,7 +35,7 @@ namespace AZ::Render // This callback only gets triggered by console commands, so this will not recurse. AtomBridge::AtomViewportInfoDisplayRequestBus::Broadcast( &AtomBridge::AtomViewportInfoDisplayRequestBus::Events::SetDisplayState, - static_cast(newDisplayInfoVal) + aznumeric_cast(newDisplayInfoVal) ); }, AZ::ConsoleFunctorFlags::DontReplicate, "Toggles debugging information display.\n" @@ -184,12 +184,12 @@ namespace AZ::Render AtomBridge::ViewportInfoDisplayState AtomViewportDisplayInfoSystemComponent::GetDisplayState() const { - return static_cast(r_displayInfo.operator int()); + return aznumeric_cast(r_displayInfo.operator int()); } void AtomViewportDisplayInfoSystemComponent::SetDisplayState(AtomBridge::ViewportInfoDisplayState state) { - r_displayInfo = static_cast(state); + r_displayInfo = aznumeric_cast(state); AtomBridge::AtomViewportInfoDisplayNotificationBus::Broadcast( &AtomBridge::AtomViewportInfoDisplayNotificationBus::Events::OnViewportInfoDisplayStateChanged, state); @@ -254,10 +254,10 @@ namespace AZ::Render if (!m_tickRequests) { m_tickRequests = AZ::TickRequestBus::FindFirstHandler(); - } - if (!m_tickRequests) - { - return; + if (!m_tickRequests) + { + return; + } } AZ::ScriptTimePoint currentTime = m_tickRequests->GetTimeAtCurrentTick();