Commit be6255f1 authored by andy's avatar andy
Browse files

ENH: Refactored to avoid compiler warning

parent cbbc796b
......@@ -46,8 +46,9 @@ Foam::Dictionary<T>::Dictionary(const Dictionary& dict)
template<class T>
bool Foam::Dictionary<T>::erase(const word& keyword)
{
T* tPtr;
if (tPtr = this->remove(keyword))
T* tPtr = this->remove(keyword);
if (tPtr)
{
delete tPtr;
return true;
......@@ -59,6 +60,4 @@ bool Foam::Dictionary<T>::erase(const word& keyword)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //
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