Markos Zaharioudakis has proposed merging lp:~markos-za/zorba/markos-bugs into 
lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~markos-za/zorba/markos-bugs/+merge/77874
-- 
https://code.launchpad.net/~markos-za/zorba/markos-bugs/+merge/77874
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/rewriter/tools/udf_graph.cpp'
--- src/compiler/rewriter/tools/udf_graph.cpp	2011-07-01 23:48:40 +0000
+++ src/compiler/rewriter/tools/udf_graph.cpp	2011-10-03 08:55:42 +0000
@@ -116,7 +116,7 @@
     {
       if (std::find(callChain.begin(), callChain.end(), udf) == callChain.end())
       {
-        bool found = theNodes.find(udf);
+        bool found = theNodes.exists(udf);
 
         addEdge(callChain.back(), udf);
 

=== modified file 'src/context/dynamic_context.cpp'
--- src/context/dynamic_context.cpp	2011-09-28 21:45:20 +0000
+++ src/context/dynamic_context.cpp	2011-10-03 08:55:42 +0000
@@ -539,7 +539,7 @@
 void dynamic_context::unbindIndex(store::Item* qname)
 {
   if (theAvailableIndices != NULL)
-    theAvailableIndices->remove(qname);
+    theAvailableIndices->erase(qname);
 }
 
 
@@ -564,9 +564,9 @@
 /*******************************************************************************
 
 ********************************************************************************/
-bool dynamic_context::addExternalFunctionParam (
+bool dynamic_context::addExternalFunctionParam(
     const std::string& aName,
-    void* aValue )
+    void* aValue)
 {
   dctx_value_t val;
   val.type = dynamic_context::dctx_value_t::ext_func_param;
@@ -579,7 +579,7 @@
 /*******************************************************************************
 
 ********************************************************************************/
-bool dynamic_context::getExternalFunctionParam (
+bool dynamic_context::getExternalFunctionParam(
   const std::string& aName,
   void*& aValue) const
 {
@@ -587,7 +587,8 @@
   val.type = dynamic_context::dctx_value_t::no_val;
   val.func_param = 0;
 
-  if ( !keymap.get(aName, val) ) {
+  if ( !keymap.get(aName, val) ) 
+  {
     if (theParent)
       return theParent->getExternalFunctionParam(aName, aValue);
     else
@@ -638,15 +639,17 @@
   val.type = dynamic_context::dctx_value_t::no_val;
   val.func_param = 0;
 
-  if ( !keymap.get(aName, val) ) {
+  if ( !keymap.get(aName, val) ) 
+  {
     if (theParent)
       return theParent->getExternalFunctionParameter(aName);
     else
       return 0;
   }
 
-  ExternalFunctionParameter* lRes
-    = static_cast<ExternalFunctionParameter*>(val.func_param);
+  ExternalFunctionParameter* lRes = 
+  static_cast<ExternalFunctionParameter*>(val.func_param);
+
   return lRes;
 }
 

=== modified file 'src/runtime/indexing/index_ddl.cpp'
--- src/runtime/indexing/index_ddl.cpp	2011-07-01 05:22:12 +0000
+++ src/runtime/indexing/index_ddl.cpp	2011-10-03 08:55:42 +0000
@@ -1312,7 +1312,7 @@
 
       while(state->theIterator->next(result)) 
       {
-        if (state->theNodeHashSet->find(result))
+        if (state->theNodeHashSet->exists(result))
           STACK_PUSH(true, state);
       }
       

=== modified file 'src/runtime/sequences/sequences_impl.cpp'
--- src/runtime/sequences/sequences_impl.cpp	2011-09-02 20:43:46 +0000
+++ src/runtime/sequences/sequences_impl.cpp	2011-10-03 08:55:42 +0000
@@ -293,7 +293,7 @@
         STACK_PUSH(true, state);
       }
     }
-    else if ( ! state->theAlreadySeenMap->find(result) )
+    else if ( ! state->theAlreadySeenMap->exists(result) )
     {
       // check if the item is already in the map
       state->theAlreadySeenMap->insert(result);
@@ -1123,7 +1123,7 @@
 
   while (consumeNext(result, theChildren[0].getp(), planState))
   {
-    not_found = ! state->theRightInput->find(result);
+    not_found = ! state->theRightInput->exists(result);
     if (not_found == theAntijoin)
       STACK_PUSH(true, state);
   }

=== modified file 'src/runtime/util/handle_hashset_item_value.h'
--- src/runtime/util/handle_hashset_item_value.h	2011-09-29 11:49:32 +0000
+++ src/runtime/util/handle_hashset_item_value.h	2011-10-03 08:55:42 +0000
@@ -109,7 +109,7 @@
 
   void clear() { theSet.clear(); }
 
-  bool find(const store::Item_t& key) { return theSet.find(key); }
+  bool exists(const store::Item_t& key) { return theSet.exists(key); }
 
   bool insert(store::Item_t& key) { return theSet.insert(key); }
 };

=== modified file 'src/store/naive/collection_set.cpp'
--- src/store/naive/collection_set.cpp	2011-06-14 17:26:33 +0000
+++ src/store/naive/collection_set.cpp	2011-10-03 08:55:42 +0000
@@ -117,9 +117,12 @@
     store::Collection_t& aCollection,
     bool aDynamicCollection) 
 {
-  if (theCollections.get(const_cast<store::Item*>(aName), aCollection)) {
+  if (theCollections.get(const_cast<store::Item*>(aName), aCollection)) 
+  {
     return aCollection->isDynamic() == aDynamicCollection;
-  } else {
+  }
+  else 
+  {
     return false;
   }
 }
@@ -128,10 +131,13 @@
 bool CollectionSet::remove(const store::Item* aName, bool aDynamicCollection) 
 {
   store::Collection_t lColl;
-  if (!get(aName, lColl, aDynamicCollection)) {
+  if (!get(aName, lColl, aDynamicCollection))
+  {
     return false;
-  } else {
-    return theCollections.remove(const_cast<store::Item*>(aName));
+  }
+  else
+  {
+    return theCollections.erase(const_cast<store::Item*>(aName));
   }
 }
 

=== modified file 'src/store/naive/node_items.cpp'
--- src/store/naive/node_items.cpp	2011-09-23 14:26:00 +0000
+++ src/store/naive/node_items.cpp	2011-10-03 08:55:42 +0000
@@ -161,7 +161,7 @@
 {
   assert(theTypesMap != NULL);
 
-  NodeTypeMap::iterator ite = theTypesMap->get(n);
+  NodeTypeMap::iterator ite = theTypesMap->find(n);
 
   assert(ite != theTypesMap->end());
 
@@ -196,7 +196,7 @@
     theTypesMap = new NodeTypeMap(32, false);
   }
 
-  NodeTypeMap::iterator ite = theTypesMap->get(n);
+  NodeTypeMap::iterator ite = theTypesMap->find(n);
 
   if (ite == theTypesMap->end())
   {
@@ -216,7 +216,7 @@
 {
   assert(theTypesMap != NULL);
 
-  if (! theTypesMap->remove(n))
+  if (! theTypesMap->erase(n))
   {
     assert(false);
   }

=== modified file 'src/store/naive/qname_pool.cpp'
--- src/store/naive/qname_pool.cpp	2011-06-14 17:26:33 +0000
+++ src/store/naive/qname_pool.cpp	2011-10-03 08:55:42 +0000
@@ -110,7 +110,7 @@
     // qn in the pool, and let the pool garbage-collect it later (if it still
     // unused). If however QNameItems may be referenced by regular pointers as
     // well, then qn must be removed from the pool and really deleted
-    theHashSet.removeNoSync(qn);
+    theHashSet.eraseNoSync(qn);
     delete qn;
   }
 }
@@ -338,7 +338,7 @@
       ulong hval = hashfun::h32(qn->getPrefix().c_str(),
                                 hashfun::h32(qn->getLocalName().c_str(),
                                              hashfun::h32(qn->getNamespace().c_str())));
-      theHashSet.removeNoSync(qn, hval);
+      theHashSet.eraseNoSync(qn, hval);
 
       if (!qn->isNormalized())
       {

=== modified file 'src/store/naive/simple_index_value.cpp'
--- src/store/naive/simple_index_value.cpp	2011-06-21 19:23:09 +0000
+++ src/store/naive/simple_index_value.cpp	2011-10-03 08:55:42 +0000
@@ -226,7 +226,7 @@
     ERROR_PARAMS(key->toString(), theQname->getStringValue()));
   }
 
-  IndexMap::iterator pos = theMap.get(key);
+  IndexMap::iterator pos = theMap.find(key);
 
   if (pos != theMap.end())
   {
@@ -239,7 +239,7 @@
 
     if (all)
     {
-      theMap.remove(pos);
+      theMap.erase(pos);
       delete keyp;
       delete valueSet;
 
@@ -252,7 +252,7 @@
         
       if (valueSet->empty())
       {
-        theMap.remove(pos);
+        theMap.erase(pos);
         delete keyp;
         delete valueSet;
       }

=== modified file 'src/store/naive/simple_pul.h'
--- src/store/naive/simple_pul.h	2011-09-15 07:18:45 +0000
+++ src/store/naive/simple_pul.h	2011-10-03 08:55:42 +0000
@@ -107,7 +107,7 @@
 
   bool insert(XmlNode* key, NodeUpdates* value) { return theMap.insert(key, value); }
 
-  bool remove(XmlNode* key) { return theMap.remove(key); }
+  bool remove(XmlNode* key) { return theMap.erase(key); }
 
   void clear() { theMap.clear(); }
 };

=== modified file 'src/store/naive/simple_store.cpp'
--- src/store/naive/simple_store.cpp	2011-09-26 22:49:54 +0000
+++ src/store/naive/simple_store.cpp	2011-10-03 08:55:42 +0000
@@ -782,7 +782,7 @@
 
   store::Item* qname2 = const_cast<store::Item*>(qname);
 
-  theIndices.remove(qname2);
+  theIndices.erase(qname2);
 }
 
 
@@ -865,7 +865,7 @@
     return ic; // already deactivated in the same PUL => noop
   }
 
-  theICs.remove(icQName.getp());
+  theICs.erase(icQName.getp());
   isApplied=true;
   return ic;
 }
@@ -1197,7 +1197,9 @@
   return lIndex;
 }
 
+
 /*******************************************************************************
+
 ********************************************************************************/
 store::Index_t
 SimpleStore::destroyHashMap(const store::Item_t& aQName)
@@ -1210,11 +1212,13 @@
       ERROR_PARAMS( aQName->getStringValue() )
     );
   }
-  theHashMaps.remove(aQName.getp());
+  theHashMaps.erase(aQName.getp());
   return lIndex;
 }
 
+
 /*******************************************************************************
+
 ********************************************************************************/
 store::Index_t
 SimpleStore::getHashMap(const store::Item_t& aQName) const
@@ -1230,7 +1234,9 @@
   }
 }
 
+
 /*******************************************************************************
+
 ********************************************************************************/
 void
 SimpleStore::addHashMap(const store::Index_t& aIndex)

=== modified file 'src/store/util/hashmap_stringbuf.h'
--- src/store/util/hashmap_stringbuf.h	2011-06-14 17:26:33 +0000
+++ src/store/util/hashmap_stringbuf.h	2011-10-03 08:55:42 +0000
@@ -75,11 +75,11 @@
 
   bool get(const zstring_b& key, V& value) { return theMap.get(key, value); }
 
-  bool find(const zstring_b& key) { return theMap.find(key); } 
+  bool find(const zstring_b& key) { return theMap.exists(key); } 
 
   bool insert(zstring_b& key, V& value) { return theMap.insert(key, value); }
 
-  bool remove(const zstring_b& key) { return theMap.remove(key); }
+  bool remove(const zstring_b& key) { return theMap.erase(key); }
 };
 
 

=== modified file 'src/store/util/hashset_node_handle.h'
--- src/store/util/hashset_node_handle.h	2011-09-29 11:49:32 +0000
+++ src/store/util/hashset_node_handle.h	2011-10-03 08:55:42 +0000
@@ -56,11 +56,11 @@
 
   bool empty() const { return theSet.empty(); }
 
-  bool find(const Item_t& key) { return theSet.find(key); }
+  bool exists(const Item_t& key) { return theSet.exists(key); }
 
   bool insert(Item_t& key) { return theSet.insert(key); }
 
-  bool remove(const Item_t& key) { return theSet.remove(key); }
+  bool erase(const Item_t& key) { return theSet.erase(key); }
 };
 
 } // namespace store

=== modified file 'src/zorbautils/hashmap.h'
--- src/zorbautils/hashmap.h	2011-09-29 11:49:32 +0000
+++ src/zorbautils/hashmap.h	2011-10-03 08:55:42 +0000
@@ -482,7 +482,7 @@
   Return true if the set already contains an item that is "equal" to the given
   item; otherwise return false.
 ********************************************************************************/
-bool find(const T& item)
+bool exists(const T& item)
 {
   ulong hval = hash(item);
 
@@ -510,7 +510,7 @@
   If the given item is already in the set, return an iterator positioned at the
   associated hash entry; otherwise return the end iterator.
 ********************************************************************************/
-iterator get(const T& item)
+iterator find(const T& item)
 {
   ulong hval = hash(item);
 
@@ -640,13 +640,13 @@
   Remove the item that is pointed to by the given iterator and move the iterator
   to the next item.
 ********************************************************************************/
-void remove(iterator& ite)
+void erase(iterator& ite)
 {
   SYNC_CODE(AutoMutex lock(theMutexp);)
 
   if (ite.thePos < theHashTabSize)
   {
-    removeEntry(&theHashTab[ite.thePos], NULL);
+    eraseEntry(&theHashTab[ite.thePos], NULL);
   }
   else
   {
@@ -654,7 +654,7 @@
 
     ulong hval = hash(item);
 
-    removeNoSync(item, hval);
+    eraseNoSync(item, hval);
   }
 
   ++ite;
@@ -665,25 +665,25 @@
   If the set contains an item that is "equal" to the given item, remove that
   item from the set and return true. Otherwise, return false.
 ********************************************************************************/
-bool remove(const T& item)
+bool erase(const T& item)
 {
   ulong hval = hash(item);
 
   SYNC_CODE(AutoMutex lock(theMutexp);)
 
-  return removeNoSync(item, hval);
+  return eraseNoSync(item, hval);
 }
 
 
-bool removeNoSync(const T& item)
+bool eraseNoSync(const T& item)
 {
   ulong hval = hash(item);
 
-  return removeNoSync(item, hval);
+  return eraseNoSync(item, hval);
 }
 
 
-bool removeNoSync(const T& item, ulong hval)
+bool eraseNoSync(const T& item, ulong hval)
 {
   HASHENTRY<T, V>* entry = bucket(hval);
 
@@ -695,7 +695,7 @@
   // else copy the 2nd entry to the 1st entry and freeup the 2nd entry.
   if (equal(entry->theItem, item))
   {
-    removeEntry(entry, NULL);
+    eraseEntry(entry, NULL);
     return true;
   }
 
@@ -708,7 +708,7 @@
   {
     if (equal(entry->theItem, item))
     {
-      removeEntry(entry, preventry);
+      eraseEntry(entry, preventry);
       return true;
     }
 
@@ -777,7 +777,7 @@
 /*******************************************************************************
 
 ********************************************************************************/
-void removeEntry(HASHENTRY<T, V>* entry, HASHENTRY<T, V>* preventry)
+void eraseEntry(HASHENTRY<T, V>* entry, HASHENTRY<T, V>* preventry)
 {
   if (preventry == NULL)
   {

=== modified file 'src/zorbautils/hashset.h'
--- src/zorbautils/hashset.h	2011-06-14 17:26:33 +0000
+++ src/zorbautils/hashset.h	2011-10-03 08:55:42 +0000
@@ -77,9 +77,9 @@
   Return true if the set already contains an item that is "equal" to the given
   item; otherwise return false.
 ********************************************************************************/
-bool find(const T& item)
+bool exists(const T& item)
 {
-  return HashMap<T, DummyHashValue, C>::find(item);
+  return HashMap<T, DummyHashValue, C>::exists(item);
 }
 
 
@@ -180,9 +180,9 @@
   If the set contains an item that is "equal" to the given item, remove that
   item from the set and return true. Otherwise, return false.
 ********************************************************************************/
-bool remove(const T& item)
+bool erase(const T& item)
 {
-  return HashMap<T, DummyHashValue, C>::remove(item);
+  return HashMap<T, DummyHashValue, C>::erase(item);
 }
 
 };

=== modified file 'src/zorbautils/hashset_itemh.h'
--- src/zorbautils/hashset_itemh.h	2011-06-14 17:26:33 +0000
+++ src/zorbautils/hashset_itemh.h	2011-10-03 08:55:42 +0000
@@ -65,9 +65,9 @@
 
   void clear();
 
-  bool find(store::Item* const key) 
+  bool exists(store::Item* const key) 
   {
-    return theSet.find(key); 
+    return theSet.exists(key); 
   }
 
   bool insert(store::Item* key) 

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to