mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 20:05:33 +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
|
|
@ -91,7 +91,7 @@ class GuiContainer : public GuiControl
|
|||
inline void setAnchorRight(bool val) { mSizingOptions.mAnchorRight = val; }
|
||||
|
||||
ControlSizing getSizingOptions() const { return mSizingOptions; }
|
||||
void setSizingOptions(ControlSizing val) { mSizingOptions = val; }
|
||||
void setSizingOptions(const ControlSizing& val) { mSizingOptions = val; }
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ bool GuiSplitContainer::layoutControls( RectI &clientRect )
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void GuiSplitContainer::solvePanelConstraints( Point2I newDragPos, GuiContainer * firstPanel, GuiContainer * secondPanel, RectI clientRect )
|
||||
void GuiSplitContainer::solvePanelConstraints(Point2I newDragPos, GuiContainer * firstPanel, GuiContainer * secondPanel, const RectI& clientRect)
|
||||
{
|
||||
if( !firstPanel || !secondPanel )
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public:
|
|||
virtual inline Point2I getSplitPoint() { return mSplitPoint; };
|
||||
/// The Splitters entire Client Rectangle, this takes into account padding of this control
|
||||
virtual inline RectI getSplitRect() { return mSplitRect; };
|
||||
virtual void solvePanelConstraints( Point2I newDragPos, GuiContainer * firstPanel, GuiContainer * secondPanel, RectI clientRect );
|
||||
virtual void solvePanelConstraints(Point2I newDragPos, GuiContainer * firstPanel, GuiContainer * secondPanel, const RectI& clientRect);
|
||||
virtual Point2I getMinExtent() const;
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ void GuiTabBookCtrl::renderTabs( const Point2I &offset, const RectI &tabRect )
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void GuiTabBookCtrl::renderTab( RectI tabRect, GuiTabPageCtrl *tab )
|
||||
void GuiTabBookCtrl::renderTab(const RectI& tabRect, GuiTabPageCtrl *tab)
|
||||
{
|
||||
StringTableEntry text = tab->getText();
|
||||
ColorI oldColor;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class GuiTabBookCtrl : public GuiContainer
|
|||
/// Tab rendering subroutine, renders one tab with specified options
|
||||
/// @param tabRect the rectangle to render the tab into
|
||||
/// @param tab pointer to the tab page control for which to render the tab
|
||||
void renderTab( RectI tabRect, GuiTabPageCtrl* tab );
|
||||
void renderTab(const RectI& tabRect, GuiTabPageCtrl* tab);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue