Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
egorodet committed Aug 17, 2024
1 parent d5941ad commit 9ac8e63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Modules/Data/Types/Include/Methane/Data/Chunk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ class Chunk // NOSONAR - rule of zero is not applicable

bool operator==(const Chunk& other) const noexcept
{
if (m_data_ptr == other.m_data_ptr)
return m_data_size == other.m_data_size;

return m_data_size == other.m_data_size &&
memcmp(m_data_ptr, other.m_data_ptr, m_data_size) == 0;
return m_data_size == other.m_data_size &&
(m_data_ptr == other.m_data_ptr ||
memcmp(m_data_ptr, other.m_data_ptr, m_data_size) == 0);
}

bool operator!=(const Chunk& other) const noexcept
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ bound to Program using ProgramArgumentBinging as RootConstant.
#include <Methane/Memory.hpp>
#include <Methane/Data/Types.h>
#include <Methane/Data/RangeSet.hpp>
#include <Methane/Data/Receiver.hpp>

namespace Methane::Graphics::Rhi
{
Expand Down

0 comments on commit 9ac8e63

Please sign in to comment.