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
1=== modified file 'src/store/naive/simple_collection.cpp'
2--- src/store/naive/simple_collection.cpp 2013-02-21 15:29:59 +0000
3+++ src/store/naive/simple_collection.cpp 2013-02-28 16:05:04 +0000
4@@ -154,21 +154,22 @@
5 try
6 {
7 pos = to_xs_unsignedInt(position);
8- } catch (const std::range_error&)
9- {
10- throw ZORBA_EXCEPTION(
11- zerr::ZXQD0004_INVALID_PARAMETER,
12- ERROR_PARAMS(ZED(ZXQD0004_NOT_WITHIN_RANGE), position)
13- );
14- }
15-
16- StructuredItem* collectionItem =
17- static_cast<StructuredItem*>(theTrees[pos].getp());
18-
19- if (pos < theTrees.size() &&
20- collectionItem->getTreeId() == structuredItem->getTreeId())
21- {
22- return true;
23+ }
24+ catch (const std::range_error&)
25+ {
26+ throw ZORBA_EXCEPTION(zerr::ZXQD0004_INVALID_PARAMETER,
27+ ERROR_PARAMS(ZED(ZXQD0004_NOT_WITHIN_RANGE), position));
28+ }
29+
30+ if (pos < theTrees.size())
31+ {
32+ StructuredItem* collectionItem =
33+ static_cast<StructuredItem*>(theTrees[pos].getp());
34+
35+ if (collectionItem->getTreeId() == structuredItem->getTreeId())
36+ {
37+ return true;
38+ }
39 }
40
41 csize numTrees = theTrees.size();

Subscribers

People subscribed via source and target branches