author | erik <erik> | 2007-01-24 23:31:45 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-24 23:31:45 (UTC) |
commit | 644780047090442429342addb3fa97ec95bdc670 (patch) (side-by-side diff) | |
tree | 64032e4e81653501977b95bebdc8ebd69288d6c6 /noncore | |
parent | 0076a11b467dce1233194ce228287a2a127b1f5d (diff) | |
download | opie-644780047090442429342addb3fa97ec95bdc670.zip opie-644780047090442429342addb3fa97ec95bdc670.tar.gz opie-644780047090442429342addb3fa97ec95bdc670.tar.bz2 |
There was quite a bit of deadwood in this file. I am removing it to make
the file more readable (and smaller overall).
-rw-r--r-- | noncore/apps/opie-reader/Reb.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/noncore/apps/opie-reader/Reb.cpp b/noncore/apps/opie-reader/Reb.cpp index 2e6c1fc..65de9f6 100644 --- a/noncore/apps/opie-reader/Reb.cpp +++ b/noncore/apps/opie-reader/Reb.cpp @@ -8,48 +8,2 @@ #include "Model.h" -/* -#ifdef offsetof -#define OffsetOf(type, field) ((int) offsetof(type, field)) -#else -#define OffsetOf(type, field) ((int) ((char *) &((type *) 0)->field)) -#endif - -template<class T> -UInt32 binarychop(T* data, UInt32 n, T val) -{ - UInt32 jl = 0,jh = n-1,jm = (jl+jh)/2; - while (jh > jl+1) - { - if (data[jm] > val) - { - jh = jm; - } - else - { - jl = jm; - } - jm = (jl+jh)/2; - } - return jl; -} - -template<class T, class D> -UInt32 binarychop(D* data, UInt32 n, T val, UInt32 offset) -{ - UInt32 jl = 0,jh = n-1,jm = (jl+jh)/2; - while (jh > jl+1) - { - T* d = reinterpret_cast<T*>(reinterpret_cast<char*>(data+jm)+offset); - if (*d > val) - { - jh = jm; - } - else - { - jl = jm; - } - jm = (jl+jh)/2; - } - return jl; -} -*/ @@ -79,16 +33,2 @@ void CReb::locate(unsigned int n) { - /* - UInt32 cp = nopages-1; - for (int i = 0; i < nopages; ++i) - { - if (m_pagedetails[i].pagestart > n) - { - cp = i-1; - break; - } - } - qDebug("Requesting %u from page %u [%u]", n, cp, n - m_pagedetails[cp].pagestart); - */ - //UInt32 jl = binarychop<UInt32, Page_detail>(m_pagedetails, nopages, n, OffsetOf(Page_detail, pagestart)); - UInt32 jl = 0,jh = nopages-1,jm = (jl+jh)/2; @@ -114,4 +54,2 @@ void CReb::locate(unsigned int n) { - //jl = binarychop<int, ParaRef>(paras, noparas, val, OffsetOf(ParaRef, pos)); - UInt32 jl = 0,jh = noparas-1,jm = (jl+jh)/2; @@ -760,4 +698,2 @@ void CReb::start2endSection() { - //UInt32 jl = binarychop<UInt32>(joins, nojoins, currentpage.offset()); - UInt32 jl = 0,jh = nojoins-1,jm = (jl+jh)/2; @@ -778,3 +714,2 @@ void CReb::start2endSection() currentpage.m_endoff = joins[jl+1]-1; - //currentpage.m_endoff = joins[jh]-1; } |