mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-08 13:27:57 +00:00
[core] Use constexpr when possible
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -10,9 +10,9 @@ namespace
|
||||
// and add assertions about the highest bit.
|
||||
// The old scheme used the highest bit and the new one does not.
|
||||
// uint64_t const kTypeMask = 0x7F00000000000000;
|
||||
uint64_t const kTypeMask = 0xFF00000000000000;
|
||||
uint64_t const kReservedMask = 0x00FF000000000000;
|
||||
uint64_t const kSerialMask = 0x0000FFFFFFFFFFFF;
|
||||
uint64_t constexpr kTypeMask = 0xFF00000000000000;
|
||||
uint64_t constexpr kReservedMask = 0x00FF000000000000;
|
||||
uint64_t constexpr kSerialMask = 0x0000FFFFFFFFFFFF;
|
||||
} // namespace
|
||||
|
||||
namespace base
|
||||
|
||||
@@ -96,7 +96,7 @@ Slice<Container> MakeSlice(Container const & c, size_t offset)
|
||||
template <typename S>
|
||||
void RawSkew(size_t n, size_t maxValue, S const & s, size_t * sa)
|
||||
{
|
||||
size_t const kInvalidId = std::numeric_limits<size_t>::max();
|
||||
size_t constexpr kInvalidId = std::numeric_limits<size_t>::max();
|
||||
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user