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

Takeshi Abe tabe at fixedpoint.jp
Thu Jul 20 13:53:10 UTC 2017


 sw/source/filter/ww8/writerhelper.cxx |   17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

New commits:
commit 85eac9b404f7db255501f19ebbd56c75c4260613
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Jul 19 23:21:35 2017 +0900

    sw: std::copy_if is now available
    
    Change-Id: I78c4832ba966609fd9e2fa70b1addf4b640692fb
    Reviewed-on: https://gerrit.libreoffice.org/40185
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 6c0fda0756ac..e184f089c5e4 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -60,21 +60,6 @@ using namespace com::sun::star;
 
 namespace
 {
-    /*
-     Stroustroup forgets copy_if, See C++ Programming language Chp 18, pg 530
-    */
-    template <typename In , typename Out , typename Pred>
-        Out my_copy_if(In first, In last, Out res, Pred p)
-    {
-        while (first != last)
-        {
-            if (p(*first))
-                *res = *first;
-            ++first;
-        }
-        return res;
-    }
-
     // #i98791# - adjust sorting
     // Utility to sort SwTextFormatColl's by their assigned outline style list level
     class outlinecmp
@@ -549,7 +534,7 @@ namespace sw
         ww8::Frames GetFramesInNode(const ww8::Frames &rFrames, const SwNode &rNode)
         {
             ww8::Frames aRet;
-            my_copy_if(rFrames.begin(), rFrames.end(),
+            std::copy_if(rFrames.begin(), rFrames.end(),
                 std::back_inserter(aRet), anchoredto(rNode.GetIndex()));
             return aRet;
         }


More information about the Libreoffice-commits mailing list