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

Takeshi Abe tabe at fixedpoint.jp
Tue Oct 31 09:51:12 UTC 2017


 sfx2/source/doc/doctempl.cxx |   40 ----------------------------------------
 1 file changed, 40 deletions(-)

New commits:
commit c1316dcae2b30e626b0c0f134120f9522df93744
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Oct 31 18:37:29 2017 +0900

    sfx2: Kill dead code
    
    which has been obsoleted since 387a35cedd74fee295dfeb2ad59a74cd8dabc451.
    
    Change-Id: Icd3f0044ea67b0cecf4491399e875197282ea476
    Reviewed-on: https://gerrit.libreoffice.org/44106
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 1d2315606f97..96588028caf7 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -1294,7 +1294,6 @@ RegionData_Impl::~RegionData_Impl()
 
 size_t RegionData_Impl::GetEntryPos( const OUString& rTitle, bool& rFound ) const
 {
-#if 1   // Don't use binary search today
     const size_t nCount = maEntries.size();
 
     for ( size_t i=0; i<nCount; ++i )
@@ -1310,45 +1309,6 @@ size_t RegionData_Impl::GetEntryPos( const OUString& rTitle, bool& rFound ) cons
 
     rFound = false;
     return nCount;
-
-#else
-    // use binary search to find the correct position
-    // in the maEntries list
-
-    int     nCompVal = 1;
-    size_t  nStart = 0;
-    size_t  nEnd = maEntries.size() - 1;
-    size_t  nMid;
-
-    DocTempl_EntryData_Impl* pMid;
-
-    rFound = sal_False;
-
-    while ( nCompVal && ( nStart <= nEnd ) )
-    {
-        nMid = ( nEnd - nStart ) / 2 + nStart;
-        pMid = maEntries[ nMid ];
-
-        nCompVal = pMid->Compare( rTitle );
-
-        if ( nCompVal < 0 )     // pMid < pData
-            nStart = nMid + 1;
-        else
-            nEnd = nMid - 1;
-    }
-
-    if ( nCompVal == 0 )
-    {
-        rFound = sal_True;
-    }
-    else
-    {
-        if ( nCompVal < 0 )     // pMid < pData
-            nMid++;
-    }
-
-    return nMid;
-#endif
 }
 
 


More information about the Libreoffice-commits mailing list