diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-04 22:56:26 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-04 23:30:52 +0200 |
commit | 0d04ee97dc0096f8b417fcbc2f3380fc580a136d (patch) | |
tree | 2bdd5a1d3aaf28d73c444ad2560fc38cf79bd6be /src | |
parent | aes_util: Make CalculateNintendoTweak() an internally linked function (diff) | |
download | yuzu-0d04ee97dc0096f8b417fcbc2f3380fc580a136d.tar yuzu-0d04ee97dc0096f8b417fcbc2f3380fc580a136d.tar.gz yuzu-0d04ee97dc0096f8b417fcbc2f3380fc580a136d.tar.bz2 yuzu-0d04ee97dc0096f8b417fcbc2f3380fc580a136d.tar.lz yuzu-0d04ee97dc0096f8b417fcbc2f3380fc580a136d.tar.xz yuzu-0d04ee97dc0096f8b417fcbc2f3380fc580a136d.tar.zst yuzu-0d04ee97dc0096f8b417fcbc2f3380fc580a136d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/crypto/aes_util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/crypto/aes_util.h b/src/core/crypto/aes_util.h index ce4947a04..8ce9d6612 100644 --- a/src/core/crypto/aes_util.h +++ b/src/core/crypto/aes_util.h @@ -39,6 +39,8 @@ public: template <typename Source, typename Dest> void Transcode(const Source* src, size_t size, Dest* dest, Op op) const { + static_assert(std::is_trivially_copyable_v<Source> && std::is_trivially_copyable_v<Dest>, + "Transcode source and destination types must be trivially copyable."); Transcode(reinterpret_cast<const u8*>(src), size, reinterpret_cast<u8*>(dest), op); } @@ -47,6 +49,8 @@ public: template <typename Source, typename Dest> void XTSTranscode(const Source* src, size_t size, Dest* dest, size_t sector_id, size_t sector_size, Op op) { + static_assert(std::is_trivially_copyable_v<Source> && std::is_trivially_copyable_v<Dest>, + "XTSTranscode source and destination types must be trivially copyable."); XTSTranscode(reinterpret_cast<const u8*>(src), size, reinterpret_cast<u8*>(dest), sector_id, sector_size, op); } |