cppcheck: fix several Prefer prefix ++/-- operators
Change-Id: Ie8ce0ebb9ec979575657a89ebbfe4d01142b04e5
This commit is contained in:
parent
1ff3ab9235
commit
f52a86b459
@ -29,7 +29,7 @@ TrieNode::TrieNode(sal_Unicode aCharacter) :
|
|||||||
TrieNode::~TrieNode()
|
TrieNode::~TrieNode()
|
||||||
{
|
{
|
||||||
vector<TrieNode*>::iterator iNode;
|
vector<TrieNode*>::iterator iNode;
|
||||||
for(iNode = mChildren.begin(); iNode != mChildren.end(); iNode++)
|
for(iNode = mChildren.begin(); iNode != mChildren.end(); ++iNode)
|
||||||
{
|
{
|
||||||
delete *iNode;
|
delete *iNode;
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter)
|
|||||||
|
|
||||||
vector<TrieNode*>::iterator iNode;
|
vector<TrieNode*>::iterator iNode;
|
||||||
|
|
||||||
for(iNode = mChildren.begin(); iNode != mChildren.end(); iNode++)
|
for(iNode = mChildren.begin(); iNode != mChildren.end(); ++iNode)
|
||||||
{
|
{
|
||||||
TrieNode* pCurrent = *iNode;
|
TrieNode* pCurrent = *iNode;
|
||||||
if ( pCurrent->mCharacter == aInputCharacter )
|
if ( pCurrent->mCharacter == aInputCharacter )
|
||||||
@ -96,7 +96,7 @@ void TrieNode::collectSuggestions(OUString sPath, vector<OUString>& rSuggestionL
|
|||||||
|
|
||||||
// traverse nodes for other characters
|
// traverse nodes for other characters
|
||||||
vector<TrieNode*>::iterator iNode;
|
vector<TrieNode*>::iterator iNode;
|
||||||
for(iNode = mChildren.begin(); iNode != mChildren.end(); iNode++)
|
for(iNode = mChildren.begin(); iNode != mChildren.end(); ++iNode)
|
||||||
{
|
{
|
||||||
TrieNode* pCurrent = *iNode;
|
TrieNode* pCurrent = *iNode;
|
||||||
if (pCurrent != NULL)
|
if (pCurrent != NULL)
|
||||||
|
@ -1652,7 +1652,7 @@ void PSWriter::ImplSetClipRegion( Region& rClipRegion )
|
|||||||
RectangleVector aRectangles;
|
RectangleVector aRectangles;
|
||||||
rClipRegion.GetRegionRectangles(aRectangles);
|
rClipRegion.GetRegionRectangles(aRectangles);
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
double nX1(aRectIter->Left());
|
double nX1(aRectIter->Left());
|
||||||
double nY1(aRectIter->Top());
|
double nY1(aRectIter->Top());
|
||||||
@ -1781,7 +1781,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
|
|||||||
aRegion.GetRegionRectangles(aRectangles);
|
aRegion.GetRegionRectangles(aRectangles);
|
||||||
const long nMoveVertical(nHeightLeft - nHeightOrg);
|
const long nMoveVertical(nHeightLeft - nHeightOrg);
|
||||||
|
|
||||||
for(RectangleVector::iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
aRectIter->Move(0, nMoveVertical);
|
aRectIter->Move(0, nMoveVertical);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void ForAllRectangles (const Region& rRegion, ::boost::function<void(const Recta
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
aFunction(*aRectIter);
|
aFunction(*aRectIter);
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ namespace sdr
|
|||||||
RectangleVector aRectangles;
|
RectangleVector aRectangles;
|
||||||
rRegionPixel.GetRegionRectangles(aRectangles);
|
rRegionPixel.GetRegionRectangles(aRectangles);
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
// #i72754# possible graphical region test only with non-pro
|
// #i72754# possible graphical region test only with non-pro
|
||||||
@ -215,7 +215,7 @@ namespace sdr
|
|||||||
RectangleVector aRectangles;
|
RectangleVector aRectangles;
|
||||||
aRegion.GetRegionRectangles(aRectangles);
|
aRegion.GetRegionRectangles(aRectangles);
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
// for each rectangle, save the area
|
// for each rectangle, save the area
|
||||||
const Point aTopLeft(aRectIter->TopLeft());
|
const Point aTopLeft(aRectIter->TopLeft());
|
||||||
|
@ -69,7 +69,7 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const Region& rExpandedRegion)
|
|||||||
RectangleVector aRectangles;
|
RectangleVector aRectangles;
|
||||||
aRegionPixel.GetRegionRectangles(aRectangles);
|
aRegionPixel.GetRegionRectangles(aRectangles);
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
// for each rectangle, copy the area
|
// for each rectangle, copy the area
|
||||||
const Point aTopLeft(aRectIter->TopLeft());
|
const Point aTopLeft(aRectIter->TopLeft());
|
||||||
|
@ -626,7 +626,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c
|
|||||||
pWindow->SetLineColor(COL_LIGHTGREEN);
|
pWindow->SetLineColor(COL_LIGHTGREEN);
|
||||||
pWindow->SetFillColor();
|
pWindow->SetFillColor();
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
pWindow->DrawRect(*aRectIter);
|
pWindow->DrawRect(*aRectIter);
|
||||||
}
|
}
|
||||||
|
@ -1731,7 +1731,7 @@ void ViewShell::Paint(const Rectangle &rRect)
|
|||||||
RectangleVector aRectangles;
|
RectangleVector aRectangles;
|
||||||
aRegion.GetRegionRectangles(aRectangles);
|
aRegion.GetRegionRectangles(aRectangles);
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
Imp()->AddPaintRect(*aRectIter);
|
Imp()->AddPaintRect(*aRectIter);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ void VCLXRegion::xOrRegion( const ::com::sun::star::uno::Reference< ::com::sun::
|
|||||||
::com::sun::star::uno::Sequence< ::com::sun::star::awt::Rectangle > aRects(aRectangles.size());
|
::com::sun::star::uno::Sequence< ::com::sun::star::awt::Rectangle > aRects(aRectangles.size());
|
||||||
sal_uInt32 a(0);
|
sal_uInt32 a(0);
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
aRects.getArray()[a++] = AWTRectangle(*aRectIter);
|
aRects.getArray()[a++] = AWTRectangle(*aRectIter);
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ bool GenPspGraphics::setClipRegion( const Region& i_rClip )
|
|||||||
i_rClip.GetRegionRectangles(aRectangles);
|
i_rClip.GetRegionRectangles(aRectangles);
|
||||||
m_pPrinterGfx->BeginSetClipRegion(aRectangles.size());
|
m_pPrinterGfx->BeginSetClipRegion(aRectangles.size());
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
const long nW(aRectIter->GetWidth());
|
const long nW(aRectIter->GetWidth());
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ void SvpSalGraphics::ensureClip()
|
|||||||
RectangleVector aRectangles;
|
RectangleVector aRectangles;
|
||||||
m_aClipRegion.GetRegionRectangles(aRectangles);
|
m_aClipRegion.GetRegionRectangles(aRectangles);
|
||||||
|
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
const long nW(aRectIter->GetWidth());
|
const long nW(aRectIter->GetWidth());
|
||||||
if(nW)
|
if(nW)
|
||||||
@ -224,7 +224,7 @@ bool SvpSalGraphics::isClippedSetup( const basegfx::B2IBox &aRange, SvpSalGraphi
|
|||||||
Rectangle aHitRect;
|
Rectangle aHitRect;
|
||||||
RectangleVector aRectangles;
|
RectangleVector aRectangles;
|
||||||
m_aClipRegion.GetRegionRectangles(aRectangles);
|
m_aClipRegion.GetRegionRectangles(aRectangles);
|
||||||
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
|
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
|
||||||
{
|
{
|
||||||
if( aRectIter->IsOver( aRect ) )
|
if( aRectIter->IsOver( aRect ) )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user