diff options
| author | Dan Engelbrecht <[email protected]> | 2022-03-23 17:20:39 +0100 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-03-31 11:29:27 +0200 |
| commit | a24ebc13bd3321eaef5757f6b42fd7fa2ebdfcc0 (patch) | |
| tree | 5292d47e59ca5821c13328670fd0952082506b6c /zenstore/include | |
| parent | typedef for LocationMap (diff) | |
| download | zen-a24ebc13bd3321eaef5757f6b42fd7fa2ebdfcc0.tar.xz zen-a24ebc13bd3321eaef5757f6b42fd7fa2ebdfcc0.zip | |
review feedback
Diffstat (limited to 'zenstore/include')
| -rw-r--r-- | zenstore/include/zenstore/blockstore.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zenstore/include/zenstore/blockstore.h b/zenstore/include/zenstore/blockstore.h index 69ad38d87..306282665 100644 --- a/zenstore/include/zenstore/blockstore.h +++ b/zenstore/include/zenstore/blockstore.h @@ -27,19 +27,19 @@ struct BlockStoreDiskLocation constexpr static uint32_t MaxBlockIndex = (1ul << BlockStoreDiskLocation::MaxBlockIndexBits) - 1ul; constexpr static uint32_t MaxOffset = (1ul << BlockStoreDiskLocation::MaxOffsetBits) - 1ul; - BlockStoreDiskLocation(const BlockStoreLocation& Location, uint64_t OffsetAlignement) + BlockStoreDiskLocation(const BlockStoreLocation& Location, uint64_t OffsetAlignment) { - Init(Location.BlockIndex, Location.Offset / OffsetAlignement, Location.Size); + Init(Location.BlockIndex, Location.Offset / OffsetAlignment, Location.Size); } BlockStoreDiskLocation() = default; - inline BlockStoreLocation Get(uint64_t OffsetAlignement) const + inline BlockStoreLocation Get(uint64_t OffsetAlignment) const { uint64_t PackedOffset = 0; memcpy(&PackedOffset, &m_Offset, sizeof m_Offset); return {.BlockIndex = static_cast<std::uint32_t>(PackedOffset >> MaxOffsetBits), - .Offset = (PackedOffset & MaxOffset) * OffsetAlignement, + .Offset = (PackedOffset & MaxOffset) * OffsetAlignment, .Size = GetSize()}; } |