diff options
author | Max Lingua | 2014-01-09 21:06:26 -0500 |
---|---|---|
committer | Max Lingua | 2014-01-18 13:38:12 -0500 |
commit | 14f3a09c8ccb1b821924234ce4e330382ef5d5ab (patch) | |
tree | d2551deff9d726802b4f8aabc5e21bd49f33ad1c /backends | |
parent | 17e8a6f220eb524bfebe07067266799268b45e04 (diff) | |
download | scummvm-rg350-14f3a09c8ccb1b821924234ce4e330382ef5d5ab.tar.gz scummvm-rg350-14f3a09c8ccb1b821924234ce4e330382ef5d5ab.tar.bz2 scummvm-rg350-14f3a09c8ccb1b821924234ce4e330382ef5d5ab.zip |
PS2: used C++ const_cast<...> where appropriate
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/ps2/asyncfio.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/platform/ps2/asyncfio.cpp b/backends/platform/ps2/asyncfio.cpp index 7e06172722..357ca955b1 100644 --- a/backends/platform/ps2/asyncfio.cpp +++ b/backends/platform/ps2/asyncfio.cpp @@ -33,7 +33,7 @@ AsyncFio::AsyncFio(void) { _runningOp = NULL; - memset((int *)_ioSlots, 0, MAX_HANDLES * sizeof(int)); + memset(const_cast<int *>(_ioSlots), 0, MAX_HANDLES * sizeof(int)); ee_sema_t newSema; newSema.init_count = 1; newSema.max_count = 1; @@ -80,7 +80,7 @@ void AsyncFio::close(int handle) { void AsyncFio::checkSync(void) { if (_runningOp) { - fileXioWaitAsync(FXIO_WAIT, (int *)_runningOp); + fileXioWaitAsync(FXIO_WAIT, const_cast<int *>(_runningOp)); _runningOp = NULL; } } @@ -99,7 +99,7 @@ void AsyncFio::write(int fd, const void *src, unsigned int len) { checkSync(); assert(fd < MAX_HANDLES); _runningOp = _ioSlots + fd; - fileXioWrite(fd, (unsigned char *)src, len); + fileXioWrite(fd, (unsigned char *)const_cast<void *>(src), len); SignalSema(_ioSema); } @@ -210,7 +210,7 @@ bool AsyncFio::poll(int fd) { bool retVal = false; if (PollSema(_ioSema) >= 0) { if (_runningOp == _ioSlots + fd) { - if (fileXioWaitAsync(FXIO_NOWAIT, (int *)_runningOp) == FXIO_COMPLETE) { + if (fileXioWaitAsync(FXIO_NOWAIT, const_cast<int *>(_runningOp)) == FXIO_COMPLETE) { _runningOp = NULL; retVal = true; } else @@ -226,7 +226,7 @@ bool AsyncFio::fioAvail(void) { bool retVal = false; if (PollSema(_ioSema) > 0) { if (_runningOp) { - if (fileXioWaitAsync(FXIO_NOWAIT, (int *)_runningOp) == FXIO_COMPLETE) { + if (fileXioWaitAsync(FXIO_NOWAIT, const_cast<int *>(_runningOp)) == FXIO_COMPLETE) { _runningOp = NULL; retVal = true; } else |