Fix invalid command profiling logic
This commit is contained in:
parent
8fdda6d980
commit
49e2ecdcdb
|
@ -514,7 +514,7 @@ void CommandManager::execute_single_command(CommandParameters params,
|
|||
if (debug_flags & DebugFlags::Commands)
|
||||
write_to_debug_buffer(format("command {}", join(params, ' ')));
|
||||
|
||||
on_scope_end([&] {
|
||||
auto profile = on_scope_end([&] {
|
||||
if (not (debug_flags & DebugFlags::Profile))
|
||||
return;
|
||||
auto full = std::chrono::duration_cast<std::chrono::microseconds>(Clock::now() - start);
|
||||
|
|
|
@ -61,7 +61,7 @@ Singleton<T>* Singleton<T>::ms_instance = nullptr;
|
|||
// This permits to cleanup c-style resources without implementing
|
||||
// a wrapping class
|
||||
template<typename T>
|
||||
class OnScopeEnd
|
||||
class [[nodiscard]] OnScopeEnd
|
||||
{
|
||||
public:
|
||||
[[gnu::always_inline]]
|
||||
|
|
Loading…
Reference in New Issue
Block a user