diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 31091a28..4d7c15e3 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -219,8 +219,8 @@ static void PrintSourceFragment( const SourceContents& src, uint32_t srcline, in } -enum { JumpSeparationBase = 6 }; -enum { JumpArrowBase = 9 }; +constexpr float JumpSeparationBase = 6; +constexpr float JumpArrowBase = 9; SourceView::SourceView() : m_font( nullptr ) diff --git a/server/TracyView_ContextSwitch.cpp b/server/TracyView_ContextSwitch.cpp index 095b78f9..965876e2 100644 --- a/server/TracyView_ContextSwitch.cpp +++ b/server/TracyView_ContextSwitch.cpp @@ -8,7 +8,7 @@ namespace tracy { -enum { MinCtxSize = 4 }; +constexpr float MinCtxSize = 4; const char* View::DecodeContextSwitchReasonCode( uint8_t reason ) { diff --git a/server/TracyView_CpuData.cpp b/server/TracyView_CpuData.cpp index 9fc47384..07b2815f 100644 --- a/server/TracyView_CpuData.cpp +++ b/server/TracyView_CpuData.cpp @@ -9,7 +9,7 @@ namespace tracy { -enum { MinVisSize = 3 }; +constexpr float MinVisSize = 3; int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover, float yMin, float yMax ) { diff --git a/server/TracyView_FrameTimeline.cpp b/server/TracyView_FrameTimeline.cpp index 96ab66b1..59ade44a 100644 --- a/server/TracyView_FrameTimeline.cpp +++ b/server/TracyView_FrameTimeline.cpp @@ -10,8 +10,8 @@ namespace tracy { -enum { MinVisSize = 3 }; -enum { MinFrameSize = 5 }; +constexpr float MinVisSize = 3; +constexpr float MinFrameSize = 5; static tracy_force_inline uint32_t GetColorMuted( uint32_t color, bool active ) { diff --git a/server/TracyView_Locks.cpp b/server/TracyView_Locks.cpp index 43e2a8c2..0fdea3f9 100644 --- a/server/TracyView_Locks.cpp +++ b/server/TracyView_Locks.cpp @@ -10,7 +10,7 @@ namespace tracy { -enum { MinVisSize = 3 }; +constexpr float MinVisSize = 3; static tracy_force_inline uint64_t GetThreadBit( uint8_t thread ) { diff --git a/server/TracyView_Timeline.cpp b/server/TracyView_Timeline.cpp index 9fe36fd4..83693f62 100644 --- a/server/TracyView_Timeline.cpp +++ b/server/TracyView_Timeline.cpp @@ -9,7 +9,7 @@ namespace tracy { -enum { MinVisSize = 3 }; +constexpr float MinVisSize = 3; extern double s_time; diff --git a/server/TracyView_ZoneTimeline.cpp b/server/TracyView_ZoneTimeline.cpp index cc837c09..c11bad9a 100644 --- a/server/TracyView_ZoneTimeline.cpp +++ b/server/TracyView_ZoneTimeline.cpp @@ -9,7 +9,7 @@ namespace tracy { -enum { MinVisSize = 3 }; +constexpr float MinVisSize = 3; static tracy_force_inline uint32_t MixGhostColor( uint32_t c0, uint32_t c1 ) {