Move tracy version to a separate header.

This commit is contained in:
Bartosz Taudul 2018-07-29 14:20:44 +02:00
parent ccc5c37af5
commit 12b90d1630
4 changed files with 21 additions and 2 deletions

14
server/TracyVersion.hpp Normal file
View File

@ -0,0 +1,14 @@
#ifndef __TRACYVERSION_HPP__
#define __TRACYVERSION_HPP__
namespace tracy
{
namespace Version
{
enum { Major = 0 };
enum { Minor = 3 };
enum { Patch = 200 };
}
}
#endif

View File

@ -26,6 +26,7 @@
#include "../common/TracySystem.hpp"
#include "TracyFileRead.hpp"
#include "TracyFileWrite.hpp"
#include "TracyVersion.hpp"
#include "TracyWorker.hpp"
#include "tracy_flat_hash_map.hpp"
@ -38,9 +39,9 @@ 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', 0, 3, 200 };
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( FileHeader[FileHeaderMagic], FileHeader[FileHeaderMagic+1], FileHeader[FileHeaderMagic+2] );
static const int CurrentVersion = FileVersion( Version::Major, Version::Minor, Version::Patch );
static void UpdateLockCountLockable( LockMap& lockmap, size_t pos )

View File

@ -141,6 +141,7 @@
<ClInclude Include="..\..\..\server\TracySlab.hpp" />
<ClInclude Include="..\..\..\server\TracyVarArray.hpp" />
<ClInclude Include="..\..\..\server\TracyVector.hpp" />
<ClInclude Include="..\..\..\server\TracyVersion.hpp" />
<ClInclude Include="..\..\..\server\TracyView.hpp" />
<ClInclude Include="..\..\..\server\TracyWorker.hpp" />
<ClInclude Include="..\..\..\server\tracy_flat_hash_map.hpp" />

View File

@ -185,6 +185,9 @@
<ClInclude Include="..\..\src\Arimo.hpp">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\server\TracyVersion.hpp">
<Filter>server</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Natvis Include="DebugVis.natvis" />