Skip to content
Snippets Groups Projects
Commit c7267ed9 authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: remove disabled methods from autoPtr

- (have been disabled for more than 1 year)
parent 470b30b5
Branches
Tags
No related merge requests found
......@@ -96,7 +96,7 @@ public:
// pointer
inline void reset(T* = 0);
//- Delete object and set pointer to NULL, if the pointer is valid.
//- Delete object (if the pointer is valid) and set pointer to NULL.
inline void clear();
......@@ -108,9 +108,7 @@ public:
//- Return const reference to the object data
inline const T& operator()() const;
// inline T& operator*();
// inline const T& operator*() const;
//- Const cast to the underlying type reference
inline operator const T&() const;
//- Return object pointer
......@@ -119,7 +117,7 @@ public:
//- Return const object pointer
inline const T* operator->() const;
//- Take over object pointer from parameter
//- Take over the object pointer from parameter
inline void operator=(const autoPtr<T>&);
};
......
......@@ -80,7 +80,7 @@ inline void Foam::autoPtr<T>::set(T* p)
{
if (ptr_)
{
FatalErrorIn("void autoPtr<T>::set(T*)")
FatalErrorIn("void Foam::autoPtr<T>::set(T*)")
<< "object already allocated"
<< abort(FatalError);
}
......@@ -115,7 +115,7 @@ inline T& Foam::autoPtr<T>::operator()()
{
if (!ptr_)
{
FatalErrorIn("T& autoPtr<T>::operator()()")
FatalErrorIn("T& Foam::autoPtr<T>::operator()()")
<< "object is not allocated"
<< abort(FatalError);
}
......@@ -129,7 +129,7 @@ inline const T& Foam::autoPtr<T>::operator()() const
{
if (!ptr_)
{
FatalErrorIn("const T& autoPtr<T>::operator()() const")
FatalErrorIn("const T& Foam::autoPtr<T>::operator()() const")
<< "object is not allocated"
<< abort(FatalError);
}
......@@ -138,22 +138,6 @@ inline const T& Foam::autoPtr<T>::operator()() const
}
/*
template<class T>
inline T& Foam::autoPtr<T>::operator*()
{
return operator()();
}
template<class T>
inline const T& Foam::autoPtr<T>::operator*() const
{
return operator()();
}
*/
template<class T>
inline Foam::autoPtr<T>::operator const T&() const
{
......@@ -166,7 +150,7 @@ inline T* Foam::autoPtr<T>::operator->()
{
if (!ptr_)
{
FatalErrorIn("autoPtr<T>::operator->()")
FatalErrorIn("Foam::autoPtr<T>::operator->()")
<< "object is not allocated"
<< abort(FatalError);
}
......
......@@ -25,7 +25,7 @@ Class
Foam::refCount
Description
Reference counter for tmp\<field\>.
Reference counter for various OpenFOAM components.
\*---------------------------------------------------------------------------*/
......
......@@ -62,7 +62,7 @@ class tmp
//- Pointer to temporary object
mutable T* ptr_;
// Const reference to constant object
//- Const reference to constant object
const T& ref_;
......
......@@ -60,7 +60,7 @@ inline Foam::tmp<T>::tmp(const tmp<T>& t)
}
else
{
FatalErrorIn("tmp<T>::tmp(const tmp<T>&)")
FatalErrorIn("Foam::tmp<T>::tmp(const tmp<T>&)")
<< "attempted copy of a deallocated temporary"
<< abort(FatalError);
}
......@@ -116,7 +116,7 @@ inline T* Foam::tmp<T>::ptr() const
{
if (!ptr_)
{
FatalErrorIn("tmp<T>::ptr() const")
FatalErrorIn("Foam::tmp<T>::ptr() const")
<< "temporary deallocated"
<< abort(FatalError);
}
......@@ -155,7 +155,7 @@ inline T& Foam::tmp<T>::operator()()
{
if (!ptr_)
{
FatalErrorIn("T& tmp<T>::operator()()")
FatalErrorIn("T& Foam::tmp<T>::operator()()")
<< "temporary deallocated"
<< abort(FatalError);
}
......@@ -184,7 +184,7 @@ inline const T& Foam::tmp<T>::operator()() const
{
if (!ptr_)
{
FatalErrorIn("const T& tmp<T>::operator()() const")
FatalErrorIn("const T& Foam::tmp<T>::operator()() const")
<< "temporary deallocated"
<< abort(FatalError);
}
......@@ -212,7 +212,7 @@ inline T* Foam::tmp<T>::operator->()
{
if (!ptr_)
{
FatalErrorIn("tmp<T>::operator->()")
FatalErrorIn("Foam::tmp<T>::operator->()")
<< "temporary deallocated"
<< abort(FatalError);
}
......@@ -260,14 +260,14 @@ inline void Foam::tmp<T>::operator=(const tmp<T>& t)
}
else
{
FatalErrorIn("tmp<T>::operator=(const tmp<T>& t)")
FatalErrorIn("Foam::tmp<T>::operator=(const tmp<T>&)")
<< "attempted copy of a deallocated temporary"
<< abort(FatalError);
}
}
else
{
FatalErrorIn("tmp<T>::operator=(const tmp<T>& t)")
FatalErrorIn("Foam::tmp<T>::operator=(const tmp<T>&)")
<< "attempted to assign to a const reference to constant object"
<< abort(FatalError);
}
......
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