summaryrefslogtreecommitdiff
path: root/src/utils/physfsrwops.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/utils/physfsrwops.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/utils/physfsrwops.cpp')
-rw-r--r--src/utils/physfsrwops.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/utils/physfsrwops.cpp b/src/utils/physfsrwops.cpp
index 3599f7f31..e5e7e8e98 100644
--- a/src/utils/physfsrwops.cpp
+++ b/src/utils/physfsrwops.cpp
@@ -66,7 +66,7 @@ static PHYSFSINT physfsrwops_seek(SDL_RWops *const rw, const PHYSFSINT offset,
return -1;
} /* if */
- pos = static_cast<int>(current);
+ pos = CAST_S32(current);
if (static_cast<PHYSFS_sint64>(pos) != current)
{
SDL_SetError("Can't fit current file position in an int!");
@@ -127,15 +127,15 @@ static PHYSFSSIZE physfsrwops_read(SDL_RWops *const rw,
PHYSFS_file *const handle = static_cast<PHYSFS_file *const>(
rw->hidden.unknown.data1);
const PHYSFS_sint64 rc = PHYSFS_read(handle, ptr,
- static_cast<unsigned int>(size),
- static_cast<unsigned int>(maxnum));
+ CAST_U32(size),
+ CAST_U32(maxnum));
if (rc != static_cast<PHYSFS_sint64>(maxnum))
{
if (!PHYSFS_eof(handle)) /* not EOF? Must be an error. */
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
} /* if */
- return static_cast<int>(rc);
+ return CAST_S32(rc);
} /* physfsrwops_read */
static PHYSFSSIZE physfsrwops_write(SDL_RWops *const rw, const void *ptr,
@@ -147,12 +147,12 @@ static PHYSFSSIZE physfsrwops_write(SDL_RWops *const rw, const void *ptr,
PHYSFS_file *const handle = static_cast<PHYSFS_file *const>(
rw->hidden.unknown.data1);
const PHYSFS_sint64 rc = PHYSFS_write(handle, ptr,
- static_cast<unsigned int>(size),
- static_cast<unsigned int>(num));
+ CAST_U32(size),
+ CAST_U32(num));
if (rc != static_cast<PHYSFS_sint64>(num))
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
- return static_cast<int>(rc);
+ return CAST_S32(rc);
} /* physfsrwops_write */
static int physfsrwops_close(SDL_RWops *const rw)