mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Active status of scoped zone can't change.
This commit is contained in:
parent
52207f20b7
commit
a99d74966c
@ -16,9 +16,11 @@ class ScopedZone
|
||||
{
|
||||
public:
|
||||
tracy_force_inline ScopedZone( const SourceLocation* srcloc )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
: m_active( s_profiler.IsConnected() )
|
||||
#endif
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
m_active = s_profiler.IsConnected();
|
||||
if( !m_active ) return;
|
||||
#endif
|
||||
const auto thread = GetThreadHandle();
|
||||
@ -41,9 +43,11 @@ public:
|
||||
}
|
||||
|
||||
tracy_force_inline ScopedZone( const SourceLocation* srcloc, int depth )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
: m_active( s_profiler.IsConnected() )
|
||||
#endif
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
m_active = s_profiler.IsConnected();
|
||||
if( !m_active ) return;
|
||||
#endif
|
||||
const auto thread = GetThreadHandle();
|
||||
@ -128,7 +132,7 @@ private:
|
||||
uint64_t m_thread;
|
||||
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
bool m_active;
|
||||
const bool m_active;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user