Kaydet (Commit) c1316dca authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Julien Nabet

sfx2: Kill dead code

which has been obsoleted since 387a35ce.

Change-Id: Icd3f0044ea67b0cecf4491399e875197282ea476
Reviewed-on: https://gerrit.libreoffice.org/44106Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
Tested-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst f55a9b77
...@@ -1294,7 +1294,6 @@ RegionData_Impl::~RegionData_Impl() ...@@ -1294,7 +1294,6 @@ RegionData_Impl::~RegionData_Impl()
size_t RegionData_Impl::GetEntryPos( const OUString& rTitle, bool& rFound ) const 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(); const size_t nCount = maEntries.size();
for ( size_t i=0; i<nCount; ++i ) for ( size_t i=0; i<nCount; ++i )
...@@ -1310,45 +1309,6 @@ size_t RegionData_Impl::GetEntryPos( const OUString& rTitle, bool& rFound ) cons ...@@ -1310,45 +1309,6 @@ size_t RegionData_Impl::GetEntryPos( const OUString& rTitle, bool& rFound ) cons
rFound = false; rFound = false;
return nCount; 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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment