summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-08 16:55:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 08:40:57 +0200
commit4c09f8e087cae598efbb78759110c03ed10e3a3a (patch)
tree963bf5ef462eacc2195ffb23d22c6e7e5fd0d627 /canvas
parent58edb05341494dfaa3d3ce33505b97961d5f2ea9 (diff)
clang-tidy modernize-use-emplace in c*
Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9 Reviewed-on: https://gerrit.libreoffice.org/42110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx4
-rw-r--r--canvas/source/factory/cf_service.cxx18
-rw-r--r--canvas/source/tools/spriteredrawmanager.cxx14
3 files changed, 18 insertions, 18 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index bb6b38d98765..bac25404379b 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -334,8 +334,8 @@ namespace cairocanvas
{
if( aFontData.empty() || aGlyphIter->fallbacklevel != aFontData.back().second )
{
- aFontData.push_back(FontLevel(rOutDev.GetSysFontData(aGlyphIter->fallbacklevel),
- aGlyphIter->fallbacklevel));
+ aFontData.emplace_back(rOutDev.GetSysFontData(aGlyphIter->fallbacklevel),
+ aGlyphIter->fallbacklevel);
if( !isCairoRenderable(aFontData.back().first) )
{
bCairoRenderable = false;
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index 535f09c63727..5a846aef7bb3 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -168,15 +168,15 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
Sequence<OUString> implementationList;
if( (xEntryNameAccess->getByName("PreferredImplementations") >>= implementationList) )
{
- m_aAvailableImplementations.push_back( std::make_pair(*pCurr,implementationList) );
+ m_aAvailableImplementations.emplace_back(*pCurr,implementationList );
}
if( (xEntryNameAccess->getByName("AcceleratedImplementations") >>= implementationList) )
{
- m_aAcceleratedImplementations.push_back( std::make_pair(*pCurr,implementationList) );
+ m_aAcceleratedImplementations.emplace_back(*pCurr,implementationList );
}
if( (xEntryNameAccess->getByName("AntialiasingImplementations") >>= implementationList) )
{
- m_aAAImplementations.push_back( std::make_pair(*pCurr,implementationList) );
+ m_aAAImplementations.emplace_back(*pCurr,implementationList );
}
}
@@ -198,12 +198,12 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
// Ugh. Looks like configuration is borked. Fake minimal
// setup.
Sequence<OUString> aServices { "com.sun.star.comp.rendering.Canvas.VCL" };
- m_aAvailableImplementations.push_back( std::make_pair(OUString("com.sun.star.rendering.Canvas"),
- aServices) );
+ m_aAvailableImplementations.emplace_back(OUString("com.sun.star.rendering.Canvas"),
+ aServices );
aServices[0] = "com.sun.star.comp.rendering.SpriteCanvas.VCL";
- m_aAvailableImplementations.push_back( std::make_pair(OUString("com.sun.star.rendering.SpriteCanvas"),
- aServices) );
+ m_aAvailableImplementations.emplace_back(OUString("com.sun.star.rendering.SpriteCanvas"),
+ aServices );
}
}
@@ -428,8 +428,8 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
else
{
// new service name, add new cache entry
- m_aCachedImplementations.push_back(std::make_pair(serviceName,
- pCurrImpl->trim()));
+ m_aCachedImplementations.emplace_back(serviceName,
+ pCurrImpl->trim());
}
return xCanvas;
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx
index 3cf44368c3f8..971ad9af4ab1 100644
--- a/canvas/source/tools/spriteredrawmanager.cxx
+++ b/canvas/source/tools/spriteredrawmanager.cxx
@@ -468,19 +468,19 @@ namespace canvas
const ::basegfx::B2DPoint& rNewPos,
const ::basegfx::B2DVector& rSpriteSize )
{
- maChangeRecords.push_back( SpriteChangeRecord( rSprite,
- rOldPos,
- rNewPos,
- rSpriteSize ) );
+ maChangeRecords.emplace_back( rSprite,
+ rOldPos,
+ rNewPos,
+ rSpriteSize );
}
void SpriteRedrawManager::updateSprite( const Sprite::Reference& rSprite,
const ::basegfx::B2DPoint& rPos,
const ::basegfx::B2DRange& rUpdateArea )
{
- maChangeRecords.push_back( SpriteChangeRecord( rSprite,
- rPos,
- rUpdateArea ) );
+ maChangeRecords.emplace_back( rSprite,
+ rPos,
+ rUpdateArea );
}
}