Merge pull request #1356 from Areloch/PVS_Cleanup_813

Convert un-modified function arguments to const references.
This commit is contained in:
Daniel Buckmaster 2015-07-20 22:55:22 +10:00
commit 4f2f1ca4e1
40 changed files with 59 additions and 59 deletions

View file

@ -526,7 +526,7 @@ void GuiGradientCtrl::reInitSwatches( GuiGradientCtrl::PickMode )
}
}
void GuiGradientCtrl::addColorRange( Point2I pos, ColorF color )
void GuiGradientCtrl::addColorRange(Point2I pos, const ColorF& color)
{
if( pos.x + mSwatchFactor < mBlendRangeBox.point.x &&
pos.x + mSwatchFactor > mBlendRangeBox.extent.x )

View file

@ -148,7 +148,7 @@ public:
void inspectPreApply();
void inspectPostApply();
void reInitSwatches( GuiGradientCtrl::PickMode );
void addColorRange( Point2I pos, ColorF color );
void addColorRange(Point2I pos, const ColorF& color);
void removeColorRange( GuiGradientSwatchCtrl* swatch );
void sortColorRange();

View file

@ -677,7 +677,7 @@ DefineEngineMethod( GuiListBoxCtrl, setItemColor, void, (S32 index, ColorF color
object->setItemColor( index, color );
}
void GuiListBoxCtrl::setItemColor( S32 index, ColorF color )
void GuiListBoxCtrl::setItemColor(S32 index, const ColorF& color)
{
if ((index >= mItems.size()) || index < 0)
{
@ -1090,7 +1090,7 @@ void GuiListBoxCtrl::onRender( Point2I offset, const RectI &updateRect )
GFX->setClipRect( oldClipRect );
}
void GuiListBoxCtrl::onRenderItem( RectI itemRect, LBItem *item )
void GuiListBoxCtrl::onRenderItem(const RectI& itemRect, LBItem *item)
{
if( item->isSelected )
GFX->getDrawUtil()->drawRectFill( itemRect, mProfile->mFillColorSEL );

View file

@ -107,7 +107,7 @@ public:
S32 insertItemWithColor( S32 index, StringTableEntry text, ColorF color = ColorF(-1, -1, -1), void *itemData = NULL);
S32 findItemText( StringTableEntry text, bool caseSensitive = false );
void setItemColor(S32 index, ColorF color);
void setItemColor(S32 index, const ColorF& color);
void clearItemColor(S32 index);
void deleteItem( S32 index );
@ -128,7 +128,7 @@ public:
// Rendering
virtual void onRender( Point2I offset, const RectI &updateRect );
virtual void onRenderItem( RectI itemRect, LBItem *item );
virtual void onRenderItem(const RectI& itemRect, LBItem *item);
void drawBox( const Point2I &box, S32 size, ColorI &outlineColor, ColorI &boxColor );
bool renderTooltip( const Point2I &hoverPos, const Point2I& cursorPos, const char* tipText );
void addFilteredItem( String item );