Skip to content

Commit

Permalink
[util] add: spaceship op to MemoryMarker and MemoryBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
jd28 committed Oct 8, 2024
1 parent b88ad4e commit c4c16ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/nw/util/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ struct MemoryBlock {
uint8_t* block = nullptr;
size_t position = 0;
size_t size = 0;

auto operator<=>(const MemoryBlock&) const = default;
};

struct MemoryMarker {
size_t chunk_index = 0;
size_t position = 0;

auto operator<=>(const MemoryMarker&) const = default;
};

/// A growable Memory Arena
Expand Down

0 comments on commit c4c16ea

Please sign in to comment.