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:
committed by
GitHub
parent
cfd94d4fa5
commit
2323cc1596
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user