Display proper message when there are no active allocations.

This commit is contained in:
Bartosz Taudul 2019-09-21 00:54:30 +02:00
parent feddd58b46
commit 46f7235e32

View File

@ -11818,9 +11818,16 @@ void View::DrawMemory()
ImGui::SameLine(); ImGui::SameLine();
TextFocused( "Memory usage:", MemSizeToString( total ) ); TextFocused( "Memory usage:", MemSizeToString( total ) );
ListMemData<decltype( items.begin() )>( items.begin(), items.end(), []( auto& v ) { if( !items.empty() )
ImGui::Text( "0x%" PRIx64, (*v)->ptr ); {
}, "##activeMem" ); ListMemData<decltype( items.begin() )>( items.begin(), items.end(), []( auto& v ) {
ImGui::Text( "0x%" PRIx64, (*v)->ptr );
}, "##activeMem" );
}
else
{
TextDisabledUnformatted( "No active allocations" );
}
ImGui::TreePop(); ImGui::TreePop();
} }