diff --git a/db/kv_checksum.h b/db/kv_checksum.h index bfec80b51..0729d1318 100644 --- a/db/kv_checksum.h +++ b/db/kv_checksum.h @@ -56,7 +56,7 @@ using ProtectionInfoKVOS64 = ProtectionInfoKVOS; template class ProtectionInfo { public: - ProtectionInfo() = default; + ProtectionInfo() = default; Status GetStatus() const; ProtectionInfoKVO ProtectKVO(const Slice& key, const Slice& value, @@ -83,7 +83,7 @@ class ProtectionInfo { static const uint64_t kSeedS = 0x77A00858DDD37F21; static const uint64_t kSeedC = 0x4A2AB5CBD26F542C; - ProtectionInfo(T val) : val_(val) { + ProtectionInfo(T val) : val_(val) { static_assert(sizeof(ProtectionInfo) == sizeof(T), ""); } @@ -96,7 +96,7 @@ class ProtectionInfo { template class ProtectionInfoKVO { public: - ProtectionInfoKVO() = default; + ProtectionInfoKVO() = default; ProtectionInfo StripKVO(const Slice& key, const Slice& value, ValueType op_type) const; @@ -117,7 +117,7 @@ class ProtectionInfoKVO { friend class ProtectionInfoKVOS; friend class ProtectionInfoKVOC; - explicit ProtectionInfoKVO(T val) : info_(val) { + explicit ProtectionInfoKVO(T val) : info_(val) { static_assert(sizeof(ProtectionInfoKVO) == sizeof(T), ""); } @@ -130,7 +130,7 @@ class ProtectionInfoKVO { template class ProtectionInfoKVOC { public: - ProtectionInfoKVOC() = default; + ProtectionInfoKVOC() = default; ProtectionInfoKVO StripC(ColumnFamilyId column_family_id) const; @@ -155,7 +155,7 @@ class ProtectionInfoKVOC { private: friend class ProtectionInfoKVO; - explicit ProtectionInfoKVOC(T val) : kvo_(val) { + explicit ProtectionInfoKVOC(T val) : kvo_(val) { static_assert(sizeof(ProtectionInfoKVOC) == sizeof(T), ""); } @@ -168,7 +168,7 @@ class ProtectionInfoKVOC { template class ProtectionInfoKVOS { public: - ProtectionInfoKVOS() = default; + ProtectionInfoKVOS() = default; ProtectionInfoKVO StripS(SequenceNumber sequence_number) const; @@ -193,7 +193,7 @@ class ProtectionInfoKVOS { private: friend class ProtectionInfoKVO; - explicit ProtectionInfoKVOS(T val) : kvo_(val) { + explicit ProtectionInfoKVOS(T val) : kvo_(val) { static_assert(sizeof(ProtectionInfoKVOS) == sizeof(T), ""); }