diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2017-10-31 18:37:29 +0900 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-10-31 10:50:46 +0100 |
commit | c1316dcae2b30e626b0c0f134120f9522df93744 (patch) | |
tree | 5f21c0e92b229feec747ed59824fcd466fb2e0c6 | |
parent | f55a9b77b8bfe6fc5e0fbceb0c89aed66660e107 (diff) |
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@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 40 |
1 files changed, 0 insertions, 40 deletions
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 } |