summaryrefslogtreecommitdiff
path: root/vcl/headless/svpframe.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-11-22 20:39:13 +0100
committerJulien Nabet <serval2412@yahoo.fr>2017-11-23 07:05:46 +0100
commit4ccddab6ef74cb07c2998eaf420785eeceda5a8d (patch)
tree21564564f4622969cc83d61b0cf86f6df902bcf9 /vcl/headless/svpframe.cxx
parent3c508bf9fc1b2704080a71d7374bf3720343beb5 (diff)
Replace some lists by vectors in vcl/headless
+use for range loops when loops included "std::list" Change-Id: Ic261571ef64b1a710233ff949c4feeb3cc4756cd Reviewed-on: https://gerrit.libreoffice.org/45109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'vcl/headless/svpframe.cxx')
-rw-r--r--vcl/headless/svpframe.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 12fbf88ba63b..711806226c49 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -156,7 +156,7 @@ SalGraphics* SvpSalFrame::AcquireGraphics()
void SvpSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
{
SvpSalGraphics* pSvpGraphics = dynamic_cast<SvpSalGraphics*>(pGraphics);
- m_aGraphics.remove( pSvpGraphics );
+ m_aGraphics.erase(std::remove(m_aGraphics.begin(), m_aGraphics.end(), pSvpGraphics), m_aGraphics.end());
delete pSvpGraphics;
}
@@ -275,10 +275,9 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
aFrameSize.getY());
// update device in existing graphics
- for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin();
- it != m_aGraphics.end(); ++it )
+ for (auto const& graphic : m_aGraphics)
{
- (*it)->setSurface(m_pSurface, aFrameSize);
+ graphic->setSurface(m_pSurface, aFrameSize);
}
}
if( m_bVisible )