Address more of PVS studio warnings
This commit is contained in:
parent
46bf7605f4
commit
b6f62af7d1
4 changed files with 7 additions and 7 deletions
|
@ -30,12 +30,12 @@ namespace Catch {
|
|||
|
||||
void addRef() const noexcept {
|
||||
if( m_refs > 0 )
|
||||
m_refs++;
|
||||
++m_refs;
|
||||
}
|
||||
void release() const noexcept {
|
||||
unsigned int refs = m_refs;
|
||||
if( refs > 1 )
|
||||
m_refs--;
|
||||
--m_refs;
|
||||
else if( refs == 1 )
|
||||
delete[] reinterpret_cast<char const*>( this );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue