From 17e8a6f220eb524bfebe07067266799268b45e04 Mon Sep 17 00:00:00 2001 From: Max Lingua Date: Thu, 9 Jan 2014 20:57:17 -0500 Subject: PS2: cleaned cast (X*) -> (X *) --- backends/platform/ps2/asyncfio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform/ps2/asyncfio.cpp') diff --git a/backends/platform/ps2/asyncfio.cpp b/backends/platform/ps2/asyncfio.cpp index 3f20349107..7e06172722 100644 --- a/backends/platform/ps2/asyncfio.cpp +++ b/backends/platform/ps2/asyncfio.cpp @@ -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 *)src, len); SignalSema(_ioSema); } -- cgit v1.2.3 From 14f3a09c8ccb1b821924234ce4e330382ef5d5ab Mon Sep 17 00:00:00 2001 From: Max Lingua Date: Thu, 9 Jan 2014 21:06:26 -0500 Subject: PS2: used C++ const_cast<...> where appropriate --- backends/platform/ps2/asyncfio.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'backends/platform/ps2/asyncfio.cpp') 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(_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(_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(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(_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(_runningOp)) == FXIO_COMPLETE) { _runningOp = NULL; retVal = true; } else -- cgit v1.2.3 From e73027f2b8891eb84abd700c7832efd0dcbf0898 Mon Sep 17 00:00:00 2001 From: Max Lingua Date: Fri, 10 Jan 2014 00:50:58 -0500 Subject: PS2: fixed tabs and alignment --- backends/platform/ps2/asyncfio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform/ps2/asyncfio.cpp') diff --git a/backends/platform/ps2/asyncfio.cpp b/backends/platform/ps2/asyncfio.cpp index 357ca955b1..0197ce33f8 100644 --- a/backends/platform/ps2/asyncfio.cpp +++ b/backends/platform/ps2/asyncfio.cpp @@ -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) { -- cgit v1.2.3