mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 09:14:36 +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:
|
public:
|
||||||
tracy_force_inline ScopedZone( const SourceLocation* srcloc )
|
tracy_force_inline ScopedZone( const SourceLocation* srcloc )
|
||||||
|
#ifdef TRACY_ON_DEMAND
|
||||||
|
: m_active( s_profiler.IsConnected() )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
m_active = s_profiler.IsConnected();
|
|
||||||
if( !m_active ) return;
|
if( !m_active ) return;
|
||||||
#endif
|
#endif
|
||||||
const auto thread = GetThreadHandle();
|
const auto thread = GetThreadHandle();
|
||||||
@ -41,9 +43,11 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
tracy_force_inline ScopedZone( const SourceLocation* srcloc, int depth )
|
tracy_force_inline ScopedZone( const SourceLocation* srcloc, int depth )
|
||||||
|
#ifdef TRACY_ON_DEMAND
|
||||||
|
: m_active( s_profiler.IsConnected() )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
m_active = s_profiler.IsConnected();
|
|
||||||
if( !m_active ) return;
|
if( !m_active ) return;
|
||||||
#endif
|
#endif
|
||||||
const auto thread = GetThreadHandle();
|
const auto thread = GetThreadHandle();
|
||||||
@ -128,7 +132,7 @@ private:
|
|||||||
uint64_t m_thread;
|
uint64_t m_thread;
|
||||||
|
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
bool m_active;
|
const bool m_active;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user