diff --git a/Code/Editor/Settings.cpp b/Code/Editor/Settings.cpp index ad9996adcd..eef2ca0461 100644 --- a/Code/Editor/Settings.cpp +++ b/Code/Editor/Settings.cpp @@ -1088,7 +1088,7 @@ void SEditorSettings::ConvertPath(const AZStd::string_view sourcePath, AZStd::st AzToolsFramework::EditorSettingsAPIRequests::SettingOutcome SEditorSettings::GetValue(const AZStd::string_view path) { - if (path.find("|") < 0) + if (path.find("|") == AZStd::string_view::npos) { return { AZStd::string("Invalid Path - could not find separator \"|\"") }; } @@ -1106,7 +1106,7 @@ AzToolsFramework::EditorSettingsAPIRequests::SettingOutcome SEditorSettings::Get AzToolsFramework::EditorSettingsAPIRequests::SettingOutcome SEditorSettings::SetValue(const AZStd::string_view path, const AZStd::any& value) { - if (path.find("|") < 0) + if (path.find("|") == AZStd::string_view::npos) { return { AZStd::string("Invalid Path - could not find separator \"|\"") }; } diff --git a/Code/Framework/AzCore/AzCore/std/chrono/types.h b/Code/Framework/AzCore/AzCore/std/chrono/types.h index c86c684426..19ef2c8469 100644 --- a/Code/Framework/AzCore/AzCore/std/chrono/types.h +++ b/Code/Framework/AzCore/AzCore/std/chrono/types.h @@ -211,7 +211,7 @@ namespace AZStd // 20.9.3.2, observer: constexpr rep count() const { return m_rep; } // 20.9.3.3, arithmetic: - constexpr duration operator+() const { *this; } + constexpr duration operator+() const { return *this; } constexpr duration operator-() const { return duration(-m_rep); } constexpr duration& operator++() { ++m_rep; return *this; } constexpr duration operator++(int) { return duration(m_rep++); } diff --git a/Code/Framework/AzCore/AzCore/std/containers/ring_buffer.h b/Code/Framework/AzCore/AzCore/std/containers/ring_buffer.h index 746af8974e..31fbdd85e9 100644 --- a/Code/Framework/AzCore/AzCore/std/containers/ring_buffer.h +++ b/Code/Framework/AzCore/AzCore/std/containers/ring_buffer.h @@ -1056,7 +1056,7 @@ namespace AZStd inline void insert(const iterator& pos, ForwardIterator first, ForwardIterator last, const AZStd::forward_iterator_tag&) { size_type size = AZStd::distance(first, last); - AZSTD_CONTAINER_ASSERT(size >= 0, "AZStd::ring_buffer::insert - there are no elements to insert!"); + AZSTD_CONTAINER_ASSERT(first > last, "AZStd::ring_buffer::insert - there are no elements to insert!"); if (size == 0) { return; diff --git a/Code/Framework/AzCore/AzCore/std/utils.h b/Code/Framework/AzCore/AzCore/std/utils.h index 2d098af55e..0de56cedcb 100644 --- a/Code/Framework/AzCore/AzCore/std/utils.h +++ b/Code/Framework/AzCore/AzCore/std/utils.h @@ -294,7 +294,7 @@ namespace AZStd T& m_v; constexpr addr_impl_ref(T& v) : m_v(v) {} - constexpr addr_impl_ref& operator=(const addr_impl_ref& v) { m_v = v; } + constexpr addr_impl_ref& operator=(const addr_impl_ref& v) { m_v = v; return *this; } constexpr operator T& () const { return m_v; } }; diff --git a/Gems/LyShine/Code/Editor/HierarchyMenu.cpp b/Gems/LyShine/Code/Editor/HierarchyMenu.cpp index f4e1776440..ab0c250434 100644 --- a/Gems/LyShine/Code/Editor/HierarchyMenu.cpp +++ b/Gems/LyShine/Code/Editor/HierarchyMenu.cpp @@ -34,7 +34,7 @@ HierarchyMenu::HierarchyMenu(HierarchyWidget* hierarchy, New_EmptyElement(hierarchy, selectedItems, menu, (showMask & Show::kNew_EmptyElementAtRoot), optionalPos); } - if (showMask & Show::kNew_InstantiateSlice | Show::kNew_InstantiateSliceAtRoot) + if (showMask & (Show::kNew_InstantiateSlice | Show::kNew_InstantiateSliceAtRoot)) { New_ElementFromSlice(hierarchy, selectedItems, menu, (showMask & Show::kNew_InstantiateSliceAtRoot), optionalPos); }