Move page init to a non-inlined function.

This commit is contained in:
Bartosz Taudul 2018-04-03 13:30:56 +02:00
parent 6d40502068
commit bc27c99a1e

View File

@ -4025,13 +4025,15 @@ void View::DrawMemory()
ImGui::End(); ImGui::End();
} }
static void PreparePageInit( Vector<int8_t>& page )
{
page.reserve_and_use( PageSize );
memset( page.data(), 0, PageSize );
}
static tracy_force_inline void PreparePage( Vector<int8_t>& page ) static tracy_force_inline void PreparePage( Vector<int8_t>& page )
{ {
if( page.empty() ) if( page.empty() ) PreparePageInit( page );
{
page.reserve_and_use( PageSize );
memset( page.data(), 0, PageSize );
}
} }
Vector<Vector<int8_t>> View::GetMemoryPages() const Vector<Vector<int8_t>> View::GetMemoryPages() const