Skip to content

Commit

Permalink
fix iarray memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
YGXXD committed Jun 13, 2024
1 parent bcbe42c commit 092816b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ktm/interface/shared/iarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ struct iarray : Father
#endif
};
KTM_FUNC iarray(const iarray& copy) noexcept { std::memcpy(data(), copy.data(), sizeof(array_type)); }
KTM_FUNC iarray(iarray&& copy) noexcept { std::memmove(data(), copy.data(), sizeof(array_type)); };
KTM_FUNC iarray(iarray&& copy) noexcept { std::memcpy(data(), copy.data(), sizeof(array_type)); };
KTM_FUNC iarray& operator=(const iarray& copy) noexcept { std::memcpy(data(), copy.data(), sizeof(array_type)); return *this; }
KTM_FUNC iarray& operator=(iarray&& copy) noexcept { std::memmove(data(), copy.data(), sizeof(array_type)); return *this; }
KTM_FUNC iarray& operator=(iarray&& copy) noexcept { std::memcpy(data(), copy.data(), sizeof(array_type)); return *this; }

template<size_t Index>
KTM_FUNC typename array_type::value_type get() const noexcept
Expand Down

0 comments on commit 092816b

Please sign in to comment.