Bunch of small bug fixes (#2813)
* fix an error with addr_impl_ref assignment operator Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * chrono duration unary '+' was missing a return Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * HierarchyMenu constructor logic fix Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * at least assert in case of invalid arguments to ring_buffer::insert Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * EditorSettings using incorrect string_view::find result comparison Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
@@ -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 \"|\"") };
|
||||
}
|
||||
|
||||
@@ -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++); }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user