1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Rework processing bad files.

This commit is contained in:
Bartosz Taudul
2019-08-12 12:04:27 +02:00
parent 9b6328f962
commit a9b41eb657
5 changed files with 38 additions and 19 deletions
+15 -2
View File
@@ -6,12 +6,25 @@
namespace tracy
{
struct BadVersionState
{
enum State
{
Ok,
BadFile,
UnsupportedVersion
};
State state = Ok;
int version = 0;
};
namespace detail
{
void BadVersionImpl( int& badVer );
void BadVersionImpl( BadVersionState& badVer );
}
tracy_force_inline void BadVersion( int& badVer ) { if( badVer != 0 ) detail::BadVersionImpl( badVer ); }
tracy_force_inline void BadVersion( BadVersionState& badVer ) { if( badVer.state != BadVersionState::Ok ) detail::BadVersionImpl( badVer ); }
}