From 94382f54ca3249db823dc8f5b4134e34e695a60c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 19 Aug 2019 22:55:37 +0200 Subject: [PATCH] Move FileVersion() to TracyFileHeader.hpp. --- server/TracyFileHeader.hpp | 7 +++++++ server/TracyWorker.cpp | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/TracyFileHeader.hpp b/server/TracyFileHeader.hpp index 67ca8afc..b49e0029 100644 --- a/server/TracyFileHeader.hpp +++ b/server/TracyFileHeader.hpp @@ -1,11 +1,18 @@ #ifndef __TRACYFILEHEADER_HPP__ #define __TRACYFILEHEADER_HPP__ +#include "../common/TracyForceInline.hpp" + namespace tracy { static const char Lz4Header[4] = { 't', 'l', 'Z', 4 }; +static constexpr tracy_force_inline int FileVersion( uint8_t h5, uint8_t h6, uint8_t h7 ) +{ + return ( h5 << 16 ) | ( h6 << 8 ) | h7; +} + } #endif diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index ffbbe664..fe44d620 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -53,11 +53,6 @@ static inline CallstackFrameId PackPointer( uint64_t ptr ) return id; } -static constexpr int FileVersion( uint8_t h5, uint8_t h6, uint8_t h7 ) -{ - return ( h5 << 16 ) | ( h6 << 8 ) | h7; -} - static const uint8_t FileHeader[8] { 't', 'r', 'a', 'c', 'y', Version::Major, Version::Minor, Version::Patch }; enum { FileHeaderMagic = 5 }; static const int CurrentVersion = FileVersion( Version::Major, Version::Minor, Version::Patch );