Commit e96cbd90 authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: remove deprecated non-const tmp() operator (deprecated since FEB-2016)

parent f2ba618c
......@@ -140,12 +140,6 @@ public:
// Member operators
#ifdef NON_CONST_TMP
//- Deprecated non-const dereference operator.
// Use ref() where non-const access is required
inline T& operator()();
#endif
//- Const dereference operator
inline const T& operator()() const;
......
......@@ -247,27 +247,6 @@ inline void Foam::tmp<T>::clear() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
#ifdef NON_CONST_TMP
template<class T>
inline T& Foam::tmp<T>::operator()()
{
if (isTmp())
{
if (!ptr_)
{
FatalErrorInFunction
<< typeName() << " deallocated"
<< abort(FatalError);
}
}
// Const-ness is automatically cast-away which is why this operator is
// deprecated. Use ref() where non-const access is required.
return *ptr_;
}
#endif
template<class T>
inline const T& Foam::tmp<T>::operator()() const
{
......
Markdown is supported
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