diff options
author | Max Lingua | 2014-01-24 19:27:41 -0500 |
---|---|---|
committer | Max Lingua | 2014-01-24 19:27:41 -0500 |
commit | 4592e0b586829fade4a5c800672849e693a0d151 (patch) | |
tree | d24505a169309d6c5d5b1df0ddf0c982111aaeeb /backends/platform/ps2/asyncfio.cpp | |
parent | 50bb717bccbf8b6f901f1531e93adf375ea53a5e (diff) | |
parent | 68836e00c9259b441628071f47f558e5f0bd0e45 (diff) | |
download | scummvm-rg350-4592e0b586829fade4a5c800672849e693a0d151.tar.gz scummvm-rg350-4592e0b586829fade4a5c800672849e693a0d151.tar.bz2 scummvm-rg350-4592e0b586829fade4a5c800672849e693a0d151.zip |
Merge remote-tracking branch 'local/master'
Diffstat (limited to 'backends/platform/ps2/asyncfio.cpp')
-rw-r--r-- | backends/platform/ps2/asyncfio.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/backends/platform/ps2/asyncfio.cpp b/backends/platform/ps2/asyncfio.cpp index 3f20349107..0197ce33f8 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; @@ -63,7 +63,7 @@ int AsyncFio::open(const char *name, int ioMode, int mode) { fileXioWaitAsync(FXIO_WAIT, &res); SignalSema(_ioSema); // dbg_printf("FIO: open ext(%s, %d, %d) => %d", name, ioMode, mode, res); - return res; + return res; } void AsyncFio::close(int handle) { @@ -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; } } @@ -90,7 +90,7 @@ void AsyncFio::read(int fd, void *dest, unsigned int len) { checkSync(); assert(fd < MAX_HANDLES); _runningOp = _ioSlots + fd; - fileXioRead(fd, (unsigned char*)dest, len); + fileXioRead(fd, (unsigned char *)dest, len); SignalSema(_ioSema); } @@ -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 |