zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #01703
[Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba.
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/81432
trying to fix Windows compilation problem
--
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/81432
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/qname_pool.h'
--- src/store/naive/qname_pool.h 2011-06-14 17:26:33 +0000
+++ src/store/naive/qname_pool.h 2011-11-07 06:07:40 +0000
@@ -116,7 +116,7 @@
const zstring& ns,
const zstring& pre,
const zstring& ln,
- bool sync = true);
+ bool sync = true);
void remove(QNameItem* qn);
=== modified file 'src/store/naive/simple_index_general.cpp'
--- src/store/naive/simple_index_general.cpp 2011-10-12 12:15:48 +0000
+++ src/store/naive/simple_index_general.cpp 2011-11-07 06:07:40 +0000
@@ -71,7 +71,7 @@
/******************************************************************************
********************************************************************************/
-uint32_t GeneralIndexCompareFunction::hash(const store::Item_t& key) const
+uint32_t GeneralIndexCompareFunction::hash(const store::Item* key) const
{
uint32_t hval = FNV_32_INIT;
@@ -86,8 +86,8 @@
********************************************************************************/
bool GeneralIndexCompareFunction::equal(
- const store::Item_t& key1,
- const store::Item_t& key2) const
+ const store::Item* key1,
+ const store::Item* key2) const
{
if (key1 == NULL && key2 == NULL)
return true;
@@ -95,7 +95,7 @@
if (key1 == NULL || key2 == NULL)
return false;
- if (! key1->equals(key2.getp(), theTimezone, theCollator))
+ if (! key1->equals(key2, theTimezone, theCollator))
return false;
return true;
@@ -106,8 +106,8 @@
********************************************************************************/
long GeneralIndexCompareFunction::compare(
- const store::Item_t& key1,
- const store::Item_t& key2) const
+ const store::Item* key1,
+ const store::Item* key2) const
{
long result;
@@ -669,7 +669,7 @@
//std::cout << "Index Entry Delete [" << (*ite).first << ","
// << (*ite).second << "]" << std::endl;
- (*ite).first->removeReference();
+ const_cast<store::Item*>((*ite).first)->removeReference();
delete (*ite).second;
}
@@ -832,7 +832,7 @@
//std::cout << "Index Entry Delete [" << (*ite).first << ","
// << (*ite).second << "]" << std::endl;
- (*ite).first->removeReference();
+ const_cast<store::Item*>((*ite).first)->removeReference();
delete (*ite).second;
}
@@ -1842,8 +1842,8 @@
********************************************************************************/
void ProbeGeneralIndexIterator::probeMap(
SchemaTypeCode targetMap,
- const AtomicItem_t& lowerKey,
- const AtomicItem_t& upperKey)
+ const store::Item* lowerKey,
+ const store::Item* upperKey)
{
static_cast<ProbeGeneralTreeIndexIterator*>(this)->
probeMap(static_cast<GeneralTreeIndex*>(theIndex.getp())->theMaps[targetMap],
@@ -2095,8 +2095,8 @@
********************************************************************************/
void ProbeGeneralTreeIndexIterator::probeMap(
const GeneralTreeIndex::IndexMap* map,
- const AtomicItem_t& lowerKey,
- const AtomicItem_t& upperKey)
+ const store::Item* lowerKey,
+ const store::Item* upperKey)
{
if (map == NULL)
return;
@@ -2125,9 +2125,9 @@
if (haveLower)
{
if (lowerIncl)
- theMapBegins.push_back(map->lower_bound(lowerKey.getp()));
+ theMapBegins.push_back(map->lower_bound(lowerKey));
else
- theMapBegins.push_back(map->upper_bound(lowerKey.getp()));
+ theMapBegins.push_back(map->upper_bound(lowerKey));
}
else
{
@@ -2137,9 +2137,9 @@
if (haveUpper)
{
if (upperIncl)
- theMapEnds.push_back(map->upper_bound(upperKey.getp()));
+ theMapEnds.push_back(map->upper_bound(upperKey));
else
- theMapEnds.push_back(map->lower_bound(upperKey.getp()));
+ theMapEnds.push_back(map->lower_bound(upperKey));
}
else
{
=== modified file 'src/store/naive/simple_index_general.h'
--- src/store/naive/simple_index_general.h 2011-10-12 12:15:48 +0000
+++ src/store/naive/simple_index_general.h 2011-11-07 06:07:40 +0000
@@ -47,13 +47,13 @@
const XQPCollator* getCollator() const { return theCollator; }
- uint32_t hash(const store::Item_t& key) const;
-
- bool equal(const store::Item_t& key1, const store::Item_t& key2) const;
-
- long compare(const store::Item_t& key1, const store::Item_t& key2) const;
-
- bool operator()(const store::Item_t& key1, const store::Item_t& key2) const
+ uint32_t hash(const store::Item* key) const;
+
+ bool equal(const store::Item* key1, const store::Item* key2) const;
+
+ long compare(const store::Item* key1, const store::Item* key2) const;
+
+ bool operator()(const store::Item* key1, const store::Item* key2) const
{
return compare(key1, key2) < 0;
}
@@ -129,7 +129,7 @@
friend class ProbeGeneralIndexIterator;
friend class ProbeGeneralTreeIndexIterator;
- typedef std::pair<store::Item*, GeneralIndexValue*> IndexMapPair;
+ typedef std::pair<const store::Item*, GeneralIndexValue*> IndexMapPair;
private:
static const int64_t theMaxLong;
@@ -197,7 +197,7 @@
friend class ProbeGeneralIndexIterator;
friend class ProbeGeneralHashIndexIterator;
- typedef HashMap<store::Item*,
+ typedef HashMap<const store::Item*,
GeneralIndexValue*,
GeneralIndexCompareFunction> IndexMap;
@@ -248,7 +248,7 @@
friend class ProbeGeneralIndexIterator;
friend class ProbeGeneralTreeIndexIterator;
- typedef std::map<store::Item*,
+ typedef std::map<const store::Item*,
GeneralIndexValue*,
GeneralIndexCompareFunction> IndexMap;
@@ -410,8 +410,8 @@
void probeMap(
const SchemaTypeCode targetMap,
- const AtomicItem_t& lowerKey,
- const AtomicItem_t& upperKey);
+ const store::Item* lowerKey,
+ const store::Item* upperKey);
void checkStringKeyType(const AtomicItem* keyItem) const;
@@ -467,8 +467,8 @@
void probeMap(
const GeneralTreeIndex::IndexMap* targetMap,
- const AtomicItem_t& lowerKey,
- const AtomicItem_t& upperKey);
+ const store::Item* lowerKey,
+ const store::Item* upperKey);
public:
ProbeGeneralTreeIndexIterator(const store::Index_t& index);
Follow ups