aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/shared/DataStores/DB2Store.h2
-rw-r--r--src/server/shared/DataStores/DBStorageIterator.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/shared/DataStores/DB2Store.h b/src/server/shared/DataStores/DB2Store.h
index 42afd22335f..362155552b2 100644
--- a/src/server/shared/DataStores/DB2Store.h
+++ b/src/server/shared/DataStores/DB2Store.h
@@ -76,7 +76,7 @@ class DB2Storage : public DB2StorageBase
static_assert(std::is_standard_layout_v<T>, "T in DB2Storage must have standard layout.");
public:
- using iterator = DBStorageIterator<T>;
+ using iterator = DBStorageIterator<T const*>;
using DB2StorageBase::DB2StorageBase;
diff --git a/src/server/shared/DataStores/DBStorageIterator.h b/src/server/shared/DataStores/DBStorageIterator.h
index 6df777c76c9..0ccb1be5079 100644
--- a/src/server/shared/DataStores/DBStorageIterator.h
+++ b/src/server/shared/DataStores/DBStorageIterator.h
@@ -32,7 +32,7 @@ public:
using reference = T&;
DBStorageIterator() : _index(nullptr), _pos(0), _end(0) { }
- DBStorageIterator(T const* const* index, uint32 size, uint32 pos = 0) : _index(index), _pos(pos), _end(size)
+ DBStorageIterator(value_type const* index, uint32 size, uint32 pos = 0) : _index(index), _pos(pos), _end(size)
{
if (_pos < _end)
{
@@ -41,8 +41,8 @@ public:
}
}
- T const* operator->() const { return _index[_pos]; }
- T const* operator*() const { return _index[_pos]; }
+ value_type const& operator->() const { return _index[_pos]; }
+ value_type const& operator*() const { return _index[_pos]; }
bool operator==(DBStorageIterator const& right) const { /*ASSERT(_index == right._index, "Iterator belongs to a different container")*/ return _pos == right._pos; }
@@ -66,7 +66,7 @@ public:
}
private:
- T const* const* _index;
+ value_type const* _index;
uint32 _pos;
uint32 _end;
};