start to replace old C-style casts with static_cast or reinterpret_cast, avoid implicit casts

This commit is contained in:
wmayer
2019-09-16 17:59:18 +02:00
parent 0aaa43a303
commit 52916175ed
10 changed files with 136 additions and 245 deletions

View File

@@ -47,7 +47,7 @@ Handled::Handled()
Handled::~Handled()
{
if ((int)(*_lRefCount) != 0)
if (static_cast<int>(*_lRefCount) != 0)
std::cerr << "Reference counter of deleted object is not zero!!!!!" << std::endl;
delete _lRefCount;
}
@@ -67,7 +67,7 @@ void Handled::unref() const
int Handled::getRefCount(void) const
{
return (int)(*_lRefCount);
return static_cast<int>(*_lRefCount);
}
const Handled& Handled::operator = (const Handled&)