diff options
author | alberth <alberth@openttd.org> | 2011-02-25 22:04:38 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2011-02-25 22:04:38 +0000 |
commit | 31386c42a7aa51b5b6a7abfc728b9ed4e34df0ea (patch) | |
tree | 793449a253b91916b65c373f54b4544a8c6c86b8 /src/misc | |
parent | 1dbc0a20bed5cd85035b4f84a649c4f7386b07ab (diff) | |
download | openttd-31386c42a7aa51b5b6a7abfc728b9ed4e34df0ea.tar.xz |
(svn r22145) -Codechange: Do explicit test for non-bool values.
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/countedptr.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/misc/countedptr.hpp b/src/misc/countedptr.hpp index 78115c091..fbf2a40df 100644 --- a/src/misc/countedptr.hpp +++ b/src/misc/countedptr.hpp @@ -96,10 +96,10 @@ FORCEINLINE void CCountedPtr<Tcls_>::Assign(Tcls *pT) { /* if they are the same, we do nothing */ if (pT != m_pT) { - if (pT) pT->AddRef(); // AddRef new pointer if any - Tcls *pTold = m_pT; // save original ptr - m_pT = pT; // update m_pT to new value - if (pTold) pTold->Release(); // release old ptr if any + if (pT != NULL) pT->AddRef(); // AddRef new pointer if any + Tcls *pTold = m_pT; // save original ptr + m_pT = pT; // update m_pT to new value + if (pTold != NULL) pTold->Release(); // release old ptr if any } } |