mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Issue found with PVS-Studio:
A lot of instances where some function args are not actually modified in any way, meaning that it is better for performance to convert them into const references. This prevents an additional copy, which can help performance.
This commit is contained in:
parent
ec63398042
commit
11398bb04e
40 changed files with 59 additions and 59 deletions
|
|
@ -1623,7 +1623,7 @@ void GuiMenuBar::closeMenu()
|
|||
}
|
||||
|
||||
// Called when a menu item is highlighted by the mouse
|
||||
void GuiMenuBar::highlightedMenuItem(S32 selectionIndex, RectI bounds, Point2I cellSize)
|
||||
void GuiMenuBar::highlightedMenuItem(S32 selectionIndex, const RectI& bounds, Point2I cellSize)
|
||||
{
|
||||
S32 selstore = selectionIndex;
|
||||
|
||||
|
|
@ -1777,7 +1777,7 @@ void GuiMenuBar::onAction()
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
// Performs an action when a menu item that is a submenu is selected/highlighted
|
||||
void GuiMenuBar::onSubmenuAction(S32 selectionIndex, RectI bounds, Point2I cellSize)
|
||||
void GuiMenuBar::onSubmenuAction(S32 selectionIndex, const RectI& bounds, Point2I cellSize)
|
||||
{
|
||||
if(!mouseOverSubmenu)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue