mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Issue found with PVS-Studio:
Many instances of a function or expression being used repeatedly, which can lower performance. Fixed it in these cases by creating on local var, reference or pointer that's used instead.
This commit is contained in:
parent
ec63398042
commit
2002d74b78
38 changed files with 465 additions and 371 deletions
|
|
@ -182,10 +182,11 @@ BOOL Win32WindowManager::MonitorRegionEnumProc(HMONITOR hMonitor, HDC hdcMonitor
|
|||
Vector<RectI> * regions = (Vector<RectI>*)dwData;
|
||||
|
||||
regions->increment();
|
||||
regions->last().point.x = lprcMonitor->left;
|
||||
regions->last().point.y = lprcMonitor->top;
|
||||
regions->last().extent.x = lprcMonitor->right - lprcMonitor->left;
|
||||
regions->last().extent.y = lprcMonitor->bottom - lprcMonitor->top;
|
||||
RectI& lastRegion = regions->last();
|
||||
lastRegion.point.x = lprcMonitor->left;
|
||||
lastRegion.point.y = lprcMonitor->top;
|
||||
lastRegion.extent.x = lprcMonitor->right - lprcMonitor->left;
|
||||
lastRegion.extent.y = lprcMonitor->bottom - lprcMonitor->top;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue