aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp
diff options
context:
space:
mode:
authorModMaker101 <119018978+ModMaker101@users.noreply.github.com>2026-03-07 21:56:03 -0500
committerGitHub <noreply@github.com>2026-03-08 09:56:03 +0700
commita9be52c41a02d207233199e98898fe7483d7e817 (patch)
tree71dfaec3a86b05e9ca409b97d8eb9d7f993bfdd0 /Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp
parent1be5faaea781402e7de06b263eeca4c688b7712c (diff)
Project modernization (#630)
* Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides
Diffstat (limited to 'Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp')
-rw-r--r--Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp b/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp
index 4143c555..c11a8593 100644
--- a/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp
+++ b/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp
@@ -74,8 +74,8 @@ int _wcsicmp( const wchar_t * dst, const wchar_t * src )
wchar_t f,l;
// validation section
- // _VALIDATE_RETURN(dst != NULL, EINVAL, _NLSCMPERROR);
- // _VALIDATE_RETURN(src != NULL, EINVAL, _NLSCMPERROR);
+ // _VALIDATE_RETURN(dst != nullptr, EINVAL, _NLSCMPERROR);
+ // _VALIDATE_RETURN(src != nullptr, EINVAL, _NLSCMPERROR);
do {
f = towlower(*dst);
@@ -90,7 +90,7 @@ size_t wcsnlen(const wchar_t *wcs, size_t maxsize)
{
size_t n;
-// Note that we do not check if s == NULL, because we do not
+// Note that we do not check if s == nullptr, because we do not
// return errno_t...
for (n = 0; n < maxsize && *wcs; n++, wcs++)
@@ -134,7 +134,7 @@ VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
lpSystemTime->wMilliseconds = cellRtcGetMicrosecond(&dateTime)/1000;
}
-HANDLE CreateEvent(void* lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) { PS3_STUBBED; return NULL; }
+HANDLE CreateEvent(void* lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) { PS3_STUBBED; return nullptr; }
VOID Sleep(DWORD dwMilliseconds)
{
C4JThread::Sleep(dwMilliseconds);
@@ -267,8 +267,8 @@ BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue) { return TLSStoragePS3::In
LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect)
{
int err;
- sys_addr_t newAddress = NULL;
- if(lpAddress == NULL)
+ sys_addr_t newAddress = nullptr;
+ if(lpAddress == nullptr)
{
// reserve, and possibly commit also
int commitSize = 0;
@@ -382,7 +382,7 @@ BOOL SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHi
int fd = (int) hFile;
uint64_t pos = 0, bitsToMove = (int64_t) lDistanceToMove;
- if (lpDistanceToMoveHigh != NULL)
+ if (lpDistanceToMoveHigh != nullptr)
bitsToMove |= ((uint64_t) (*lpDistanceToMoveHigh)) << 32;
int whence = 0;
@@ -490,7 +490,7 @@ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
}
else
{
- err = cellFsOpen(filePath, flags, &fd ,NULL, 0);
+ err = cellFsOpen(filePath, flags, &fd ,nullptr, 0);
iFilesOpen++;
//printf("\n\nFiles Open - %d\n\n",iFilesOpen);
}
@@ -675,7 +675,7 @@ errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_
int _wtoi(const wchar_t *_Str)
{
- return wcstol(_Str, NULL, 10);
+ return wcstol(_Str, nullptr, 10);
}