2018-04-21 21:19:48 +00:00
|
|
|
#ifndef __TRACYBADVERSION_HPP__
|
|
|
|
#define __TRACYBADVERSION_HPP__
|
|
|
|
|
|
|
|
#include "../common/TracyForceInline.hpp"
|
|
|
|
|
|
|
|
namespace tracy
|
|
|
|
{
|
|
|
|
|
2019-08-12 10:04:27 +00:00
|
|
|
struct BadVersionState
|
|
|
|
{
|
|
|
|
enum State
|
|
|
|
{
|
|
|
|
Ok,
|
|
|
|
BadFile,
|
2019-08-12 10:16:48 +00:00
|
|
|
UnsupportedVersion,
|
|
|
|
LegacyVersion
|
2019-08-12 10:04:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
State state = Ok;
|
|
|
|
int version = 0;
|
|
|
|
};
|
|
|
|
|
2018-04-21 21:19:48 +00:00
|
|
|
namespace detail
|
|
|
|
{
|
2019-08-12 10:04:27 +00:00
|
|
|
void BadVersionImpl( BadVersionState& badVer );
|
2018-04-21 21:19:48 +00:00
|
|
|
}
|
|
|
|
|
2019-08-12 10:04:27 +00:00
|
|
|
tracy_force_inline void BadVersion( BadVersionState& badVer ) { if( badVer.state != BadVersionState::Ok ) detail::BadVersionImpl( badVer ); }
|
2018-04-21 21:19:48 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|