mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Display proper message when there are no active allocations.
This commit is contained in:
parent
feddd58b46
commit
46f7235e32
@ -11818,9 +11818,16 @@ void View::DrawMemory()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextFocused( "Memory usage:", MemSizeToString( total ) );
|
TextFocused( "Memory usage:", MemSizeToString( total ) );
|
||||||
|
|
||||||
|
if( !items.empty() )
|
||||||
|
{
|
||||||
ListMemData<decltype( items.begin() )>( items.begin(), items.end(), []( auto& v ) {
|
ListMemData<decltype( items.begin() )>( items.begin(), items.end(), []( auto& v ) {
|
||||||
ImGui::Text( "0x%" PRIx64, (*v)->ptr );
|
ImGui::Text( "0x%" PRIx64, (*v)->ptr );
|
||||||
}, "##activeMem" );
|
}, "##activeMem" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "No active allocations" );
|
||||||
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user