[Libreoffice-commits] core.git: filter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Mar 16 06:18:08 UTC 2019


 filter/source/config/cache/cacheitem.hxx      |    1 -
 filter/source/graphicfilter/idxf/dxf2mtf.cxx  |    6 +++---
 filter/source/graphicfilter/idxf/dxfentrd.cxx |    2 +-
 filter/source/graphicfilter/idxf/dxfentrd.hxx |    3 +--
 4 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 97b78d77ebaf6ba676d777454c6c957a87324f12
Author:     Takeshi Abe <tabe at fixedpoint.jp>
AuthorDate: Thu Mar 14 23:01:33 2019 +0900
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Mar 16 07:17:45 2019 +0100

    filter: Replace needless std::deque with simpler std::vector
    
    Change-Id: I95ffde095909b925531a9bb1a3f0d394ba8d5c80
    Reviewed-on: https://gerrit.libreoffice.org/69267
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/filter/source/config/cache/cacheitem.hxx b/filter/source/config/cache/cacheitem.hxx
index 2b205b7f1b24..7934251fd6ce 100644
--- a/filter/source/config/cache/cacheitem.hxx
+++ b/filter/source/config/cache/cacheitem.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CACHEITEM_HXX
 #define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CACHEITEM_HXX
 
-#include <deque>
 #include <unordered_map>
 #include <com/sun/star/uno/Sequence.h>
 #include <com/sun/star/beans/PropertyValue.hpp>
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index d4335024c26d..d7e6b61fd7a8 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -572,7 +572,7 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
         tools::PolyPolygon aPolyPoly;
         for ( j = 0; j < rE.nBoundaryPathCount; j++ )
         {
-            std::deque< Point > aPtAry;
+            std::vector< Point > aPtAry;
             const DXFBoundaryPathData& rPathData = rE.pBoundaryPathData[ j ];
             if ( rPathData.bIsPolyLine )
             {
@@ -585,9 +585,9 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
             }
             else
             {
-                for ( std::deque<DXFEdgeType*>::size_type i = 0; i < rPathData.aEdges.size(); i++ )
+                for ( auto& rEdge : rPathData.aEdges )
                 {
-                    const DXFEdgeType* pEdge = rPathData.aEdges[ i ].get();
+                    const DXFEdgeType* pEdge = rEdge.get();
                     switch( pEdge->nEdgeType )
                     {
                         case 1 :
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter/source/graphicfilter/idxf/dxfentrd.cxx
index a830ce0c8fee..a35cea0fb240 100644
--- a/filter/source/graphicfilter/idxf/dxfentrd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfentrd.cxx
@@ -634,7 +634,7 @@ bool DXFBoundaryPathData::EvaluateGroup( DXFGroupReader & rDGR )
             }
         }
         else if ( !aEdges.empty() )
-            aEdges[ aEdges.size() - 1 ]->EvaluateGroup( rDGR );
+            aEdges.back()->EvaluateGroup( rDGR );
         else
             bExecutingGroupCode = false;
     }
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.hxx b/filter/source/graphicfilter/idxf/dxfentrd.hxx
index 3f6c4e46fa2e..8c56ba6317c1 100644
--- a/filter/source/graphicfilter/idxf/dxfentrd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfentrd.hxx
@@ -23,7 +23,6 @@
 #include "dxfgrprd.hxx"
 #include "dxfvec.hxx"
 
-#include <deque>
 #include <memory>
 #include <vector>
 
@@ -413,7 +412,7 @@ public:
     sal_Int32           nPointIndex;
 
     std::vector<DXFVector> aP;
-    std::deque<std::unique_ptr<DXFEdgeType>> aEdges;
+    std::vector<std::unique_ptr<DXFEdgeType>> aEdges;
 
     DXFBoundaryPathData();
     ~DXFBoundaryPathData();


More information about the Libreoffice-commits mailing list