Fix -Wmismatched-new-delete warnings

totally valid, how didn't we find them yet (ok, maybe because those
functions aren't called much)
This commit is contained in:
Daniel Gibson 2023-01-05 07:56:16 +01:00
parent 6730ddcb29
commit 996947eec6
3 changed files with 3 additions and 3 deletions

View file

@ -2228,7 +2228,7 @@ void idImageManager::PrintMemInfo( MemInfo_t *mi ) {
f->Printf( "%s %3i %s\n", idStr::FormatNumber( size ).c_str(), im->refCount, im->imgName.c_str() );
}
delete sortIndex;
delete[] sortIndex;
mi->imageAssetsTotal = total;
f->Printf( "\nTotal image bytes allocated: %s\n", idStr::FormatNumber( total ).c_str() );

View file

@ -615,7 +615,7 @@ void idRenderModelManagerLocal::PrintMemInfo( MemInfo_t *mi ) {
f->Printf( "%s %s\n", idStr::FormatNumber( mem ).c_str(), model->Name() );
}
delete sortIndex;
delete[] sortIndex;
mi->modelAssetsTotal = totalMem;
f->Printf( "\nTotal model bytes allocated: %s\n", idStr::FormatNumber( totalMem ).c_str() );

View file

@ -880,7 +880,7 @@ idBrushBSPNode *idBrushBSP::ProcessGridCell( idBrushBSPNode *node, int skipConte
BuildBrushBSP_r( node, planeList, testedPlanes, skipContents );
delete testedPlanes;
delete[] testedPlanes;
#ifdef OUPUT_BSP_STATS_PER_GRID_CELL
common->Printf( "\r%6d splits\n", numGridCellSplits );