mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
emu/profile.h: Hopefully convince clang that profile scope helpers are important even in non-profile builds.
This commit is contained in:
parent
5f97af903c
commit
395d41d0e9
@ -223,12 +223,15 @@ class dummy_profiler_state
|
||||
public:
|
||||
class scope
|
||||
{
|
||||
private:
|
||||
dummy_profiler_state &m_host;
|
||||
|
||||
public:
|
||||
scope(scope const &) = delete;
|
||||
scope &operator=(scope const &) = delete;
|
||||
scope(scope &&that) = default;
|
||||
scope(dummy_profiler_state &host, profile_type type) { }
|
||||
~scope() = default;
|
||||
scope(dummy_profiler_state &host, profile_type type) : m_host(host) { }
|
||||
~scope() { m_host.real_stop(); }
|
||||
void stop() { }
|
||||
};
|
||||
|
||||
@ -244,6 +247,9 @@ public:
|
||||
|
||||
// start/stop
|
||||
[[nodiscard]] auto start(profile_type type) { return scope(*this, type); }
|
||||
|
||||
private:
|
||||
void real_stop() { }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user