ams: improve offsetof style consistency

This commit is contained in:
Michael Scire 2021-10-18 00:17:13 -07:00
parent ec6d1a92ef
commit 889d843718
29 changed files with 140 additions and 142 deletions

View file

@ -50,7 +50,7 @@ namespace ams::crypto::impl {
public:
HmacImpl() : m_state(State_None) { /* ... */ }
~HmacImpl() {
static_assert(offsetof(HmacImpl, m_hash_function) == 0);
static_assert(AMS_OFFSETOF(HmacImpl, m_hash_function) == 0);
/* Clear everything except for the hash function. */
ClearMemory(reinterpret_cast<u8 *>(this) + sizeof(m_hash_function), sizeof(*this) - sizeof(m_hash_function));