mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +03:00
0026453: NCollection_StlIterator - declare reference getters as const
This commit is contained in:
parent
fac9298e2b
commit
e506f14279
@ -107,13 +107,13 @@ protected: //! @name methods related to forward STL iterator
|
|||||||
// an appropriate method based on template arguments (at instantiation time).
|
// an appropriate method based on template arguments (at instantiation time).
|
||||||
|
|
||||||
template<bool Condition>
|
template<bool Condition>
|
||||||
typename opencascade::enable_if<!Condition, ItemType&>::type Reference()
|
typename opencascade::enable_if<!Condition, ItemType&>::type Reference() const
|
||||||
{
|
{
|
||||||
return myIterator.ChangeValue();
|
return myIterator.ChangeValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<bool Condition>
|
template<bool Condition>
|
||||||
typename opencascade::enable_if<Condition, const ItemType&>::type Reference()
|
typename opencascade::enable_if<Condition, const ItemType&>::type Reference() const
|
||||||
{
|
{
|
||||||
return myIterator.Value();
|
return myIterator.Value();
|
||||||
}
|
}
|
||||||
@ -134,13 +134,13 @@ public: //! @name methods related to forward STL iterator
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! Get reference to current item
|
//! Get reference to current item
|
||||||
typename NCollection_StlIterator::reference operator*()
|
typename NCollection_StlIterator::reference operator*() const
|
||||||
{
|
{
|
||||||
return Reference<IsConstant>();
|
return Reference<IsConstant>();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Dereferencing operator
|
//! Dereferencing operator
|
||||||
typename NCollection_StlIterator::pointer operator->()
|
typename NCollection_StlIterator::pointer operator->() const
|
||||||
{
|
{
|
||||||
return &Reference<IsConstant>();
|
return &Reference<IsConstant>();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user