1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 22:13:07 +01:00

Use named casts instead of old-style casts

Change prepared with clang-tidy and google-readability-casting check
This commit is contained in:
Michał Janiszewski
2020-04-22 17:09:29 +02:00
committed by GitHub
parent cfd94d4fa5
commit 2323cc1596
114 changed files with 604 additions and 560 deletions

View File

@@ -48,8 +48,8 @@ bool NetworkKey::LoadPrivate(IStream* stream)
{
Guard::ArgumentNotNull(stream);
size_t size = (size_t)stream->GetLength();
if (size == (size_t)-1)
size_t size = static_cast<size_t>(stream->GetLength());
if (size == static_cast<size_t>(-1))
{
log_error("unknown size, refusing to load key");
return false;
@@ -80,8 +80,8 @@ bool NetworkKey::LoadPublic(IStream* stream)
{
Guard::ArgumentNotNull(stream);
size_t size = (size_t)stream->GetLength();
if (size == (size_t)-1)
size_t size = static_cast<size_t>(stream->GetLength());
if (size == static_cast<size_t>(-1))
{
log_error("unknown size, refusing to load key");
return false;