From 793296fb5276fcb7c174475be4dec85a71f4d183 Mon Sep 17 00:00:00 2001 From: kawi Date: Wed, 14 Jan 2015 08:02:34 +0100 Subject: [PATCH] Warnings --- base/ReSeqArray.hpp | 1 + base/ReStringList.cpp | 9 +++++---- cunit/cuReSeqArray.cpp | 21 ++++++++++----------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/base/ReSeqArray.hpp b/base/ReSeqArray.hpp index 92aec3b..3f06bb2 100644 --- a/base/ReSeqArray.hpp +++ b/base/ReSeqArray.hpp @@ -76,6 +76,7 @@ protected: return m_content.buffer(); } friend class ReHashList; + friend class ReStringList; /** @brief Returns the info of an entry of the list. * @param index The index of the wanted entry. * @return The pointer of the entry. diff --git a/base/ReStringList.cpp b/base/ReStringList.cpp index 08e0caf..52dc481 100644 --- a/base/ReStringList.cpp +++ b/base/ReStringList.cpp @@ -145,7 +145,8 @@ size_t ReStringList::sizeOf(Index index) const{ size_t rc = 0; if (index < count()){ Sequence* seq = getInfo(index); - rc = seq->m_length; + //@ToDo + rc = getLength(seq); } return rc; } @@ -161,7 +162,7 @@ size_t ReStringList::strLengthOf(Index index) const{ size_t rc = 0; if (index < count()){ Sequence* seq = getInfo(index); - rc = seq->m_length - 1; + rc = rc = getLength(seq) - 1; } return rc; } @@ -174,7 +175,7 @@ size_t ReStringList::sumOfSizes() const{ for (int ii = count() - 1; ii >= 0; ii--){ Sequence* seq = getInfo(ii); - rc += seq->m_length; + rc += rc = getLength(seq); } return rc; } @@ -187,7 +188,7 @@ size_t ReStringList::sumOfStrLengths() const{ for (int ii = count() - 1; ii >= 0; ii--){ Sequence* seq = getInfo(ii); - rc += seq->m_length - 1; + rc += rc = getLength(seq); } return rc; } diff --git a/cunit/cuReSeqArray.cpp b/cunit/cuReSeqArray.cpp index 16a08e8..bdfca22 100644 --- a/cunit/cuReSeqArray.cpp +++ b/cunit/cuReSeqArray.cpp @@ -36,30 +36,29 @@ private: ReSeqArray::Index index; checkF(list.binarySearch("cee", -1, index, NULL)); - checkEqu(5ll, index); + checkEqu(ReSeqArray::Index(5), index); checkF(list.binarySearch("ab", 2, index, NULL)); - checkEqu(0ll, index); + checkEqu(ReSeqArray::Index(0), index); checkF(list.binarySearch("ab", -1, index, NULL)); - checkEqu(0ll, index); + checkEqu(ReSeqArray::Index(0), index); checkF(list.binarySearch("abcd", -1, index, NULL)); - checkEqu(2ll, index); + checkEqu(ReSeqArray::Index(2), index); checkF(list.binarySearch("bbd", -1, index, NULL)); - checkEqu(3ll, index); + checkEqu(ReSeqArray::Index(3), index); checkF(list.binarySearch("bbd", -1, index, NULL)); - checkEqu(3ll, index); + checkEqu(ReSeqArray::Index(3), index); checkF(list.binarySearch("bc", -1, index, NULL)); - checkEqu(3ll, index); + checkEqu(ReSeqArray::Index(3), index); checkF(list.binarySearch("bcd0", -1, index, NULL)); - checkEqu(4ll, index); + checkEqu(ReSeqArray::Index(4), index); checkF(list.binarySearch("cdex", -1, index, NULL)); - checkEqu(5ll, index); + checkEqu(ReSeqArray::Index(5), index); checkF(list.binarySearch("cee", -1, index, NULL)); - checkEqu(5ll, index); + checkEqu(ReSeqArray::Index(5), index); } void testBinSearch2(){ ReSeqArray list; - ReSeqArray::Tag tag; ReSeqArray::Index index; ReByteBuffer value; list.setSorted(true); -- 2.39.5