mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: HashTable: remove conversion operator from iterator to const_iterator
This commit is contained in:
@ -97,18 +97,16 @@ struct HashTableCore
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const iteratorEnd endIter;
|
|
||||||
|
|
||||||
//- iteratorEnd set to beyond the end of any HashTable
|
//- iteratorEnd set to beyond the end of any HashTable
|
||||||
inline static const iteratorEnd& cend()
|
inline static iteratorEnd cend()
|
||||||
{
|
{
|
||||||
return endIter;
|
return iteratorEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- iteratorEnd set to beyond the end of any HashTable
|
//- iteratorEnd set to beyond the end of any HashTable
|
||||||
inline static const iteratorEnd& end()
|
inline static iteratorEnd end()
|
||||||
{
|
{
|
||||||
return endIter;
|
return iteratorEnd();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -451,9 +449,6 @@ public:
|
|||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
//- Conversion to a const_iterator
|
|
||||||
inline operator const_iterator() const;
|
|
||||||
|
|
||||||
//- Return referenced hash value
|
//- Return referenced hash value
|
||||||
inline T& operator*();
|
inline T& operator*();
|
||||||
inline T& operator()();
|
inline T& operator()();
|
||||||
@ -503,6 +498,9 @@ public:
|
|||||||
//- Construct null (end iterator)
|
//- Construct null (end iterator)
|
||||||
inline const_iterator();
|
inline const_iterator();
|
||||||
|
|
||||||
|
//- Construct from iterator
|
||||||
|
inline const_iterator(const iterator&);
|
||||||
|
|
||||||
//- Construct end iterator
|
//- Construct end iterator
|
||||||
inline const_iterator(const iteratorEnd& unused);
|
inline const_iterator(const iteratorEnd& unused);
|
||||||
|
|
||||||
|
|||||||
@ -37,9 +37,6 @@ const Foam::label Foam::HashTableCore::maxTableSize
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const Foam::HashTableCore::iteratorEnd Foam::HashTableCore::endIter;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::HashTableCore::canonicalSize(const label size)
|
Foam::label Foam::HashTableCore::canonicalSize(const label size)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -362,17 +362,6 @@ inline Foam::HashTable<T, Key, Hash>::iterator::iterator
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class T, class Key, class Hash>
|
|
||||||
inline Foam::HashTable<T, Key, Hash>::iterator::operator
|
|
||||||
typename Foam::HashTable<T, Key, Hash>::const_iterator() const
|
|
||||||
{
|
|
||||||
return *reinterpret_cast
|
|
||||||
<
|
|
||||||
const typename Foam::HashTable<T, Key, Hash>::const_iterator*
|
|
||||||
>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
inline T&
|
inline T&
|
||||||
Foam::HashTable<T, Key, Hash>::iterator::operator*()
|
Foam::HashTable<T, Key, Hash>::iterator::operator*()
|
||||||
@ -442,6 +431,16 @@ inline Foam::HashTable<T, Key, Hash>::const_iterator::const_iterator()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T, class Key, class Hash>
|
||||||
|
inline Foam::HashTable<T, Key, Hash>::const_iterator::const_iterator
|
||||||
|
(
|
||||||
|
const HashTable<T, Key, Hash>::iterator& iter
|
||||||
|
)
|
||||||
|
:
|
||||||
|
iteratorBase(iter)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
inline Foam::HashTable<T, Key, Hash>::const_iterator::const_iterator
|
inline Foam::HashTable<T, Key, Hash>::const_iterator::const_iterator
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user