Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 11025
Merged at revision: 11267
Proposed branch: lp:~zorba-coders/zorba/markos-scratch
Merge into: lp:zorba
Diff against target: 41 lines (+16/-15)
1 file modified
src/store/naive/simple_collection.cpp (+16/-15)
To merge this branch: bzr merge lp:~zorba-coders/zorba/markos-scratch
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+151040@code.launchpad.net

Commit message

small fix in SimpleCollection::findNode()

Description of the change

small fix in SimpleCollection::findNode()

To post a comment you must log in.
Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job markos-scratch-2013-02-28T16-08-07.289Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/store/naive/simple_collection.cpp'
--- src/store/naive/simple_collection.cpp 2013-02-21 15:29:59 +0000
+++ src/store/naive/simple_collection.cpp 2013-02-28 16:05:04 +0000
@@ -154,21 +154,22 @@
154 try154 try
155 {155 {
156 pos = to_xs_unsignedInt(position);156 pos = to_xs_unsignedInt(position);
157 } catch (const std::range_error&)157 }
158 {158 catch (const std::range_error&)
159 throw ZORBA_EXCEPTION(159 {
160 zerr::ZXQD0004_INVALID_PARAMETER,160 throw ZORBA_EXCEPTION(zerr::ZXQD0004_INVALID_PARAMETER,
161 ERROR_PARAMS(ZED(ZXQD0004_NOT_WITHIN_RANGE), position)161 ERROR_PARAMS(ZED(ZXQD0004_NOT_WITHIN_RANGE), position));
162 );162 }
163 }163
164164 if (pos < theTrees.size())
165 StructuredItem* collectionItem =165 {
166 static_cast<StructuredItem*>(theTrees[pos].getp());166 StructuredItem* collectionItem =
167167 static_cast<StructuredItem*>(theTrees[pos].getp());
168 if (pos < theTrees.size() &&168
169 collectionItem->getTreeId() == structuredItem->getTreeId())169 if (collectionItem->getTreeId() == structuredItem->getTreeId())
170 {170 {
171 return true;171 return true;
172 }
172 }173 }
173174
174 csize numTrees = theTrees.size();175 csize numTrees = theTrees.size();

Subscribers

People subscribed via source and target branches