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