zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #18602
[Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba.
Commit message:
small fix in SimpleCollection::findNode()
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/151040
small fix in SimpleCollection::findNode()
--
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/151040
Your team Zorba Coders is subscribed to branch lp:zorba.
=== 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 @@
try
{
pos = to_xs_unsignedInt(position);
- } catch (const std::range_error&)
- {
- throw ZORBA_EXCEPTION(
- zerr::ZXQD0004_INVALID_PARAMETER,
- ERROR_PARAMS(ZED(ZXQD0004_NOT_WITHIN_RANGE), position)
- );
- }
-
- StructuredItem* collectionItem =
- static_cast<StructuredItem*>(theTrees[pos].getp());
-
- if (pos < theTrees.size() &&
- collectionItem->getTreeId() == structuredItem->getTreeId())
- {
- return true;
+ }
+ catch (const std::range_error&)
+ {
+ throw ZORBA_EXCEPTION(zerr::ZXQD0004_INVALID_PARAMETER,
+ ERROR_PARAMS(ZED(ZXQD0004_NOT_WITHIN_RANGE), position));
+ }
+
+ if (pos < theTrees.size())
+ {
+ StructuredItem* collectionItem =
+ static_cast<StructuredItem*>(theTrees[pos].getp());
+
+ if (collectionItem->getTreeId() == structuredItem->getTreeId())
+ {
+ return true;
+ }
}
csize numTrees = theTrees.size();
Follow ups