diff --git a/profiler/src/profiler/TracySourceView.hpp b/profiler/src/profiler/TracySourceView.hpp index d317b8ac..f36daaae 100644 --- a/profiler/src/profiler/TracySourceView.hpp +++ b/profiler/src/profiler/TracySourceView.hpp @@ -72,11 +72,11 @@ private: rd }; - enum { ReadBit = 0x100 }; - enum { WriteBit = 0x200 }; - enum { ReuseBit = 0x400 }; - enum { RegMask = 0x0FF }; - enum { FlagMask = 0xF00 }; + static constexpr int ReadBit = 0x100; + static constexpr int WriteBit = 0x200; + static constexpr int ReuseBit = 0x400; + static constexpr int RegMask = 0x0FF; + static constexpr int FlagMask = 0xF00; enum class OpType : uint8_t { diff --git a/profiler/src/profiler/TracyView_Memory.cpp b/profiler/src/profiler/TracyView_Memory.cpp index f058e920..4652eb25 100644 --- a/profiler/src/profiler/TracyView_Memory.cpp +++ b/profiler/src/profiler/TracyView_Memory.cpp @@ -8,11 +8,11 @@ namespace tracy { -enum { ChunkBits = 10 }; -enum { PageBits = 10 }; -enum { PageSize = 1 << PageBits }; -enum { PageChunkBits = ChunkBits + PageBits }; -enum { PageChunkSize = 1 << PageChunkBits }; +constexpr size_t ChunkBits = 10; +constexpr size_t PageBits = 10; +constexpr size_t PageSize = 1 << PageBits; +constexpr size_t PageChunkBits = ChunkBits + PageBits; +constexpr size_t PageChunkSize = 1 << PageChunkBits; uint32_t MemDecayColor[256] = { 0x0, 0xFF077F07, 0xFF078007, 0xFF078207, 0xFF078307, 0xFF078507, 0xFF078707, 0xFF078807,