1
0

Merging r6383 through r6403 from trunk to ogl-es branch

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6404 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2022-05-15 16:02:08 +00:00
parent ec38b153da
commit ddc14ea87e
57 changed files with 337 additions and 282 deletions

View File

@@ -293,8 +293,8 @@ void IProfiler::stop(s32 id)
{
if ( Timer )
{
u32 timeNow = Timer->getRealTime();
s32 idx = ProfileDatas.binary_search(SProfileData(id));
const u32 timeNow = Timer->getRealTime();
const s32 idx = ProfileDatas.binary_search(SProfileData(id));
if ( idx >= 0 )
{
SProfileData &data = ProfileDatas[idx];
@@ -303,7 +303,7 @@ void IProfiler::stop(s32 id)
{
// update data for this id
++data.CountCalls;
u32 diffTime = timeNow - data.LastTimeStarted;
const u32 diffTime = timeNow - data.LastTimeStarted;
data.TimeSum += diffTime;
if ( diffTime > data.LongestTime )
data.LongestTime = diffTime;
@@ -336,7 +336,7 @@ s32 IProfiler::add(const core::stringw &name, const core::stringw &groupName)
}
else
{
s32 id = NextAutoId;
const s32 id = NextAutoId;
--NextAutoId;
add( id, name, groupName );
return id;
@@ -400,7 +400,7 @@ bool IProfiler::findDataIndex(u32 & result, const core::stringw &name) const
const SProfileData* IProfiler::getProfileDataById(u32 id)
{
SProfileData data(id);
s32 idx = ProfileDatas.binary_search(data);
const s32 idx = ProfileDatas.binary_search(data);
if ( idx >= 0 )
return &ProfileDatas[idx];
return NULL;