From 1a9ee0dd59a3a38b72621a6d6c64348183ea6d6a Mon Sep 17 00:00:00 2001 From: D-AIRY <admin@ds-servers.com> Date: Tue, 2 Jan 2018 20:38:33 +0300 Subject: [PATCH] changed Array::clear to Array::fastClear for best performance --- source/gcore/LoaderTextures.cpp | 2 +- source/geom/green.cpp | 2 +- source/level/weather.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gcore/LoaderTextures.cpp b/source/gcore/LoaderTextures.cpp index e435a9e2c..471480836 100644 --- a/source/gcore/LoaderTextures.cpp +++ b/source/gcore/LoaderTextures.cpp @@ -343,7 +343,7 @@ void LoaderTextures::LoadTextures() } } - ArrIDsLoad.clear(); + ArrIDsLoad.clearFast(); g_fnReportf(REPORT_MSG_LEVEL_NOTICE, "sgcore: all loaded textures [%d]\n", ArrTextures.size()); } diff --git a/source/geom/green.cpp b/source/geom/green.cpp index 6d6779cdd..e8200b659 100644 --- a/source/geom/green.cpp +++ b/source/geom/green.cpp @@ -445,7 +445,7 @@ void Green::CPUFillingArrIndeces(ISXFrustum* frustum, float3* viewpos, ID id_arr tmpcountcom = &(ArrComFor[id_arr]->arr[i]->CountCom); tmpsegments = ArrComFor[id_arr]->arr[i]->Arr; - ArrComFor[id_arr]->queue.clear(); + ArrComFor[id_arr]->queue.clearFast(); //long tmpcount = 0; ArrComFor[id_arr]->queue.push_back(ArrModels[i]->SplitsTree); diff --git a/source/level/weather.cpp b/source/level/weather.cpp index e5c227ee0..6cb9cb55d 100644 --- a/source/level/weather.cpp +++ b/source/level/weather.cpp @@ -41,7 +41,7 @@ void CWeatherRndSnd::resetOld() if (m_aCurrSndIDs[i] >= 0) SSCore_SndStop(m_aCurrSndIDs[i]); } - m_aCurrSndIDs.clear(); + m_aCurrSndIDs.clearFast(); } void CWeatherRndSnd::setParamPlayVolume(int iBVol, int iEVol) -- GitLab