mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: remove deprecated non-const tmp() operator (deprecated since FEB-2016)
This commit is contained in:
@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user