From bff0f823f0a0918a5acecfad516de452d6fd1bb1 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 28 Sep 2021 20:04:55 +0200 Subject: [PATCH] Formatting --- src/FSWrapper.cpp | 50 +++++++++++++++--------------- src/FSWrapper.h | 50 +++++++++++++++--------------- src/RPXLoading.cpp | 4 +-- src/utils/FileReaderCompressed.cpp | 2 +- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/src/FSWrapper.cpp b/src/FSWrapper.cpp index f4ce0f4..62ec7c9 100644 --- a/src/FSWrapper.cpp +++ b/src/FSWrapper.cpp @@ -137,8 +137,8 @@ void freeDirHandle(uint32_t handle) { FSStatus FSOpenDirWrapper(char *path, FSDirectoryHandle *handle, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler) { + const std::function &fallback_function, + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { return FS_STATUS_USE_REAL_OS; @@ -201,7 +201,7 @@ FSStatus FSOpenDirWrapper(char *path, FSStatus FSReadDirWrapper(FSDirectoryHandle handle, FSDirectoryEntry *entry, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || @@ -253,7 +253,7 @@ FSStatus FSReadDirWrapper(FSDirectoryHandle handle, FSStatus FSCloseDirWrapper(FSDirectoryHandle handle, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidDirHandle(handle)) { @@ -281,7 +281,7 @@ FSStatus FSCloseDirWrapper(FSDirectoryHandle handle, FSStatus FSRewindDirWrapper(FSDirectoryHandle handle, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidDirHandle(handle)) { @@ -303,8 +303,8 @@ FSStatus FSRewindDirWrapper(FSDirectoryHandle handle, FSStatus FSMakeDirWrapper(char *path, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler) { + const std::function &fallback_function, + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { @@ -334,8 +334,8 @@ FSStatus FSOpenFileWrapper(char *path, const char *mode, FSFileHandle *handle, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler) { + const std::function &fallback_function, + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { return FS_STATUS_USE_REAL_OS; @@ -424,7 +424,7 @@ FSStatus FSOpenFileWrapper(char *path, FSStatus FSCloseFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidFileHandle(handle)) { @@ -456,8 +456,8 @@ FSStatus FSCloseFileWrapper(FSFileHandle handle, } FSStatus FSGetStatWrapper(char *path, FSStat *stats, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler) { + const std::function &fallback_function, + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { return FS_STATUS_USE_REAL_OS; @@ -531,7 +531,7 @@ static inline void replaceContentPath(char *pathForCheck, int pathForCheckSize, FSStatus FSGetStatFileWrapper(FSFileHandle handle, FSStat *stats, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidFileHandle(handle)) { @@ -574,7 +574,7 @@ FSStatus FSReadFileWrapper(void *buffer, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidFileHandle(handle)) { @@ -621,7 +621,7 @@ FSStatus FSReadFileWithPosWrapper(void *buffer, FSFileHandle handle, int32_t unk1, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidFileHandle(handle)) { @@ -648,7 +648,7 @@ FSStatus FSReadFileWithPosWrapper(void *buffer, FSStatus FSSetPosFileWrapper(FSFileHandle handle, uint32_t pos, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidFileHandle(handle)) { @@ -680,7 +680,7 @@ FSStatus FSSetPosFileWrapper(FSFileHandle handle, FSStatus FSGetPosFileWrapper(FSFileHandle handle, uint32_t *pos, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidFileHandle(handle)) { @@ -713,7 +713,7 @@ FSStatus FSGetPosFileWrapper(FSFileHandle handle, FSStatus FSIsEofWrapper(FSFileHandle handle, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || !isValidFileHandle(handle)) { @@ -749,7 +749,7 @@ FSStatus FSIsEofWrapper(FSFileHandle handle, FSStatus FSTruncateFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || @@ -775,7 +775,7 @@ FSStatus FSWriteFileWrapper(uint8_t *buffer, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask, - const std::function& result_handler) { + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || @@ -791,8 +791,8 @@ FSStatus FSWriteFileWrapper(uint8_t *buffer, FSStatus FSRemoveWrapper(char *path, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler) { + const std::function &fallback_function, + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { @@ -822,8 +822,8 @@ FSStatus FSRemoveWrapper(char *path, FSStatus FSRenameWrapper(char *oldPath, char *newPath, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler) { + const std::function &fallback_function, + const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { @@ -852,7 +852,7 @@ FSStatus FSRenameWrapper(char *oldPath, return result_handler(result); } -FSStatus FSFlushFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, const std::function& result_handler) { +FSStatus FSFlushFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, const std::function &result_handler) { if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { diff --git a/src/FSWrapper.h b/src/FSWrapper.h index 68b5201..3cb1003 100644 --- a/src/FSWrapper.h +++ b/src/FSWrapper.h @@ -37,48 +37,48 @@ extern fileMagic_t file_handles[FILE_HANDLES_LENGTH]; FSStatus FSOpenDirWrapper(char *path, FSDirectoryHandle *handle, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler); + const std::function &fallback_function, + const std::function &result_handler); FSStatus FSReadDirWrapper(FSDirectoryHandle handle, FSDirectoryEntry *entry, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSCloseDirWrapper(FSDirectoryHandle handle, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSRewindDirWrapper(FSDirectoryHandle handle, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSMakeDirWrapper(char *path, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler); + const std::function &fallback_function, + const std::function &result_handler); FSStatus FSOpenFileWrapper(char *path, const char *mode, FSFileHandle *handle, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler); + const std::function &fallback_function, + const std::function &result_handler); FSStatus FSCloseFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSGetStatWrapper(char *path, FSStat *stats, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler); + const std::function &fallback_function, + const std::function &result_handler); FSStatus FSGetStatFileWrapper(FSFileHandle handle, FSStat *stats, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSReadFileWrapper(void *buffer, uint32_t size, @@ -86,7 +86,7 @@ FSStatus FSReadFileWrapper(void *buffer, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSReadFileWithPosWrapper(void *buffer, uint32_t size, @@ -95,25 +95,25 @@ FSStatus FSReadFileWithPosWrapper(void *buffer, FSFileHandle handle, int32_t unk1, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSSetPosFileWrapper(FSFileHandle handle, uint32_t pos, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSGetPosFileWrapper(FSFileHandle handle, uint32_t *pos, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSIsEofWrapper(FSFileHandle handle, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSTruncateFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSWriteFileWrapper(uint8_t *buffer, uint32_t size, @@ -121,22 +121,22 @@ FSStatus FSWriteFileWrapper(uint8_t *buffer, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); FSStatus FSRemoveWrapper(char *path, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler); + const std::function &fallback_function, + const std::function &result_handler); FSStatus FSRenameWrapper(char *oldPath, char *newPath, FSErrorFlag errorMask, - const std::function& fallback_function, - const std::function& result_handler); + const std::function &fallback_function, + const std::function &result_handler); FSStatus FSFlushFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, - const std::function& result_handler); + const std::function &result_handler); int32_t getNewDirHandleIndex(); diff --git a/src/RPXLoading.cpp b/src/RPXLoading.cpp index be73e17..b669e7d 100644 --- a/src/RPXLoading.cpp +++ b/src/RPXLoading.cpp @@ -245,8 +245,8 @@ int32_t RL_UnmountBundle(const char *name) { return romfsUnmount(name); } -bool RL_UnmountCurrentRunningBundle(){ - if(gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted == false){ +bool RL_UnmountCurrentRunningBundle() { + if (gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted == false) { return true; } if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE) { diff --git a/src/utils/FileReaderCompressed.cpp b/src/utils/FileReaderCompressed.cpp index a21121c..847532d 100644 --- a/src/utils/FileReaderCompressed.cpp +++ b/src/utils/FileReaderCompressed.cpp @@ -1,7 +1,7 @@ #include "FileReaderCompressed.h" int FileReaderCompressed::read(uint8_t *buffer, uint32_t size) { - if(!initDone){ + if (!initDone) { return -11; } int startValue = this->strm.total_out;