diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-09 09:47:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-09 08:54:01 +0000 |
commit | 3a545893029c524afc0d5d6b6b6ca486c5be991c (patch) | |
tree | f286991b7341ca02a50054e059b1a43534c4484b /svgio | |
parent | 81e3f5f2fdc9c573c83a37009080e4bb974c7955 (diff) |
convert Primitive2DContainer to std::deque
since we only care about appending to this container, and then
traversing it (normally once). So reduce the re-allocations that
std::vector requires
Change-Id: I206a7b82d9eefc1fa3762c4a03e7b5e21136951f
Reviewed-on: https://gerrit.libreoffice.org/30706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svguno/xsvgparser.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/svgio/source/svguno/xsvgparser.cxx b/svgio/source/svguno/xsvgparser.cxx index 91ded1f99b21..e84f5f67e3c0 100644 --- a/svgio/source/svguno/xsvgparser.cxx +++ b/svgio/source/svguno/xsvgparser.cxx @@ -105,7 +105,7 @@ namespace svgio const uno::Reference< ::io::XInputStream >& xSVGStream, const OUString& aAbsolutePath ) throw (uno::RuntimeException, std::exception) { - drawinglayer::primitive2d::Primitive2DSequence aRetval; + drawinglayer::primitive2d::Primitive2DContainer aRetval; if(xSVGStream.is()) { @@ -156,9 +156,7 @@ namespace svgio if(Display_none != pCandidate->getDisplay()) { - drawinglayer::primitive2d::Primitive2DContainer aTmp = comphelper::sequenceToContainer<drawinglayer::primitive2d::Primitive2DContainer>(aRetval); - pCandidate->decomposeSvgNode(aTmp, false); - aRetval = comphelper::containerToSequence(aTmp); + pCandidate->decomposeSvgNode(aRetval, false); } } } @@ -167,7 +165,7 @@ namespace svgio OSL_ENSURE(false, "Invalid stream (!)"); } - return aRetval; + return comphelper::containerToSequence(aRetval); } OUString SAL_CALL XSvgParser::getImplementationName() throw(uno::RuntimeException, std::exception) |