Commit 7bbe6c9d authored by Mark Olesen's avatar Mark Olesen
Browse files

SubList: added void operator=(const T&) for convenience

parent a11386e6
......@@ -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);
}
// ************************************************************************* //
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment