cppcheck: Function parameter 'aBox' should be passed by reference
Change-Id: I60fc65799e2fd8402a8bdb1e2850b9b34cd38a27
This commit is contained in:
@@ -63,21 +63,21 @@ FramePainter::~FramePainter (void)
|
|||||||
|
|
||||||
void FramePainter::PaintFrame (
|
void FramePainter::PaintFrame (
|
||||||
OutputDevice& rDevice,
|
OutputDevice& rDevice,
|
||||||
const Rectangle aBox) const
|
const Rectangle& rBox) const
|
||||||
{
|
{
|
||||||
if ( ! mbIsValid)
|
if ( ! mbIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Paint the shadow.
|
// Paint the shadow.
|
||||||
maTopLeft.PaintCorner(rDevice, aBox.TopLeft());
|
maTopLeft.PaintCorner(rDevice, rBox.TopLeft());
|
||||||
maTopRight.PaintCorner(rDevice, aBox.TopRight());
|
maTopRight.PaintCorner(rDevice, rBox.TopRight());
|
||||||
maBottomLeft.PaintCorner(rDevice, aBox.BottomLeft());
|
maBottomLeft.PaintCorner(rDevice, rBox.BottomLeft());
|
||||||
maBottomRight.PaintCorner(rDevice, aBox.BottomRight());
|
maBottomRight.PaintCorner(rDevice, rBox.BottomRight());
|
||||||
maLeft.PaintSide(rDevice, aBox.TopLeft(), aBox.BottomLeft(), maTopLeft, maBottomLeft);
|
maLeft.PaintSide(rDevice, rBox.TopLeft(), rBox.BottomLeft(), maTopLeft, maBottomLeft);
|
||||||
maRight.PaintSide(rDevice, aBox.TopRight(), aBox.BottomRight(), maTopRight, maBottomRight);
|
maRight.PaintSide(rDevice, rBox.TopRight(), rBox.BottomRight(), maTopRight, maBottomRight);
|
||||||
maTop.PaintSide(rDevice, aBox.TopLeft(), aBox.TopRight(), maTopLeft, maTopRight);
|
maTop.PaintSide(rDevice, rBox.TopLeft(), rBox.TopRight(), maTopLeft, maTopRight);
|
||||||
maBottom.PaintSide(rDevice, aBox.BottomLeft(), aBox.BottomRight(), maBottomLeft, maBottomRight);
|
maBottom.PaintSide(rDevice, rBox.BottomLeft(), rBox.BottomRight(), maBottomLeft, maBottomRight);
|
||||||
maCenter.PaintCenter(rDevice,aBox);
|
maCenter.PaintCenter(rDevice,rBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ public:
|
|||||||
/** Paint a border around the given box by using a set of bitmaps for
|
/** Paint a border around the given box by using a set of bitmaps for
|
||||||
the corners and sides.
|
the corners and sides.
|
||||||
*/
|
*/
|
||||||
void PaintFrame (OutputDevice&rDevice, const Rectangle aBox) const;
|
void PaintFrame (OutputDevice&rDevice, const Rectangle& rBox) const;
|
||||||
|
|
||||||
/** Special functionality that takes the color from the center
|
/** Special functionality that takes the color from the center
|
||||||
bitmap and replaces that color in all bitmaps by the given new
|
bitmap and replaces that color in all bitmaps by the given new
|
||||||
|
Reference in New Issue
Block a user