mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
SubList: added void operator=(const T&) for convenience
This commit is contained in:
@ -87,6 +87,9 @@ public:
|
||||
|
||||
//- Allow cast to a const List<T>&
|
||||
inline operator const Foam::List<T>&() const;
|
||||
|
||||
//- Assignment of all entries to the given value
|
||||
inline void operator=(const T&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ inline Foam::SubList<T>::SubList
|
||||
# ifdef FULLDEBUG
|
||||
|
||||
// Artificially allowing the start of a zero-sized subList to be
|
||||
// one past the end of the original list.
|
||||
// one past the end of the original list.
|
||||
if (subSize > 0)
|
||||
{
|
||||
list.checkStart(startIndex);
|
||||
@ -73,7 +73,7 @@ inline Foam::SubList<T>::SubList
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
const Foam::SubList<T>& Foam::SubList<T>::null()
|
||||
inline const Foam::SubList<T>& Foam::SubList<T>::null()
|
||||
{
|
||||
SubList<T>* nullPtr = reinterpret_cast<SubList<T>*>(NULL);
|
||||
return *nullPtr;
|
||||
@ -89,4 +89,11 @@ inline Foam::SubList<T>::operator const Foam::List<T>&() const
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline void Foam::SubList<T>::operator=(const T& t)
|
||||
{
|
||||
UList<T>::operator=(t);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user