mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 02:18:04 +01:00
merge some changes from develop branch; modernize and clean-up code; remove support for compiling without POCO_WIN32_UTF8
This commit is contained in:
@@ -30,12 +30,12 @@
|
||||
namespace Poco {
|
||||
|
||||
|
||||
template <class Value, class HashFunc = Hash<Value> >
|
||||
template <class Value, class HashFunc = Hash<Value>>
|
||||
class LinearHashTable
|
||||
/// This class implements a linear hash table.
|
||||
///
|
||||
/// In a linear hash table, the available address space
|
||||
/// grows or shrinks dynamically. A linar hash table thus
|
||||
/// grows or shrinks dynamically. A linear hash table thus
|
||||
/// supports any number of insertions or deletions without
|
||||
/// lookup or insertion performance deterioration.
|
||||
///
|
||||
@@ -279,15 +279,15 @@ public:
|
||||
/// Returns an iterator pointing to the first entry, if one exists.
|
||||
{
|
||||
BucketVecIterator it(_buckets.begin());
|
||||
BucketVecIterator end(_buckets.end());
|
||||
while (it != end && it->empty())
|
||||
BucketVecIterator itEnd(_buckets.end());
|
||||
while (it != itEnd && it->empty())
|
||||
{
|
||||
++it;
|
||||
}
|
||||
if (it == end)
|
||||
return this->end();
|
||||
if (it == itEnd)
|
||||
return end();
|
||||
else
|
||||
return ConstIterator(it, end, it->begin());
|
||||
return ConstIterator(it, itEnd, it->begin());
|
||||
}
|
||||
|
||||
ConstIterator end() const
|
||||
@@ -300,15 +300,15 @@ public:
|
||||
/// Returns an iterator pointing to the first entry, if one exists.
|
||||
{
|
||||
BucketVecIterator it(_buckets.begin());
|
||||
BucketVecIterator end(_buckets.end());
|
||||
while (it != end && it->empty())
|
||||
BucketVecIterator itEnd(_buckets.end());
|
||||
while (it != itEnd && it->empty())
|
||||
{
|
||||
++it;
|
||||
}
|
||||
if (it == end)
|
||||
return this->end();
|
||||
if (it == itEnd)
|
||||
return end();
|
||||
else
|
||||
return Iterator(it, end, it->begin());
|
||||
return Iterator(it, itEnd, it->begin());
|
||||
}
|
||||
|
||||
Iterator end()
|
||||
@@ -398,8 +398,8 @@ public:
|
||||
void clear()
|
||||
/// Erases all elements.
|
||||
{
|
||||
LinearHashTable empty;
|
||||
swap(empty);
|
||||
LinearHashTable emptyTable;
|
||||
swap(emptyTable);
|
||||
}
|
||||
|
||||
std::size_t size() const
|
||||
|
||||
Reference in New Issue
Block a user