diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3103a1f1..149b3587 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: check-merge-conflict - id: check-case-conflict - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.5 + rev: v22.1.2 hooks: - id: clang-format 'types_or': [c++, c] diff --git a/src/shared/ntdll_declarations.h b/src/shared/ntdll_declarations.h index 813ad8c9..49079c99 100644 --- a/src/shared/ntdll_declarations.h +++ b/src/shared/ntdll_declarations.h @@ -543,7 +543,7 @@ typedef struct _FILE_NETWORK_OPEN_INFORMATION // Nt -using NtQueryDirectoryFile_type = NTSTATUS(WINAPI*)(HANDLE, HANDLE, PIO_APC_ROUTINE, +using NtQueryDirectoryFile_type = NTSTATUS(WINAPI*)(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS, BOOLEAN, PUNICODE_STRING, BOOLEAN); @@ -569,7 +569,7 @@ using NtQueryInformationByName_type = NTSTATUS(WINAPI*)( ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); using NtOpenFile_type = NTSTATUS(WINAPI*)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, - PIO_STATUS_BLOCK, ULONG, ULONG); + PIO_STATUS_BLOCK, ULONG, ULONG); using NtCreateFile_type = NTSTATUS(WINAPI*)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, PLARGE_INTEGER, ULONG, ULONG, ULONG, ULONG, PVOID, ULONG); diff --git a/src/thooklib/hooklib.cpp b/src/thooklib/hooklib.cpp index 9dbbafaa..12745f8a 100644 --- a/src/thooklib/hooklib.cpp +++ b/src/thooklib/hooklib.cpp @@ -113,8 +113,8 @@ void WriteLongJump(LPBYTE jumpAddr, LPVOID destination) // a working, space-optimized, relative jump to outside the generated code and // we do want to optimize this jump #if BOOST_ARCH_X86_64 - intptr_t dist = reinterpret_cast(destination) - - (reinterpret_cast(jumpAddr) + 5); + intptr_t dist = reinterpret_cast(destination) - + (reinterpret_cast(jumpAddr) + 5); int32_t distShort = static_cast(dist); #else int32_t distShort = reinterpret_cast(destination) - diff --git a/src/usvfs_dll/hookcontext.cpp b/src/usvfs_dll/hookcontext.cpp index f47e42d9..233df91c 100644 --- a/src/usvfs_dll/hookcontext.cpp +++ b/src/usvfs_dll/hookcontext.cpp @@ -316,8 +316,8 @@ void HookContext::unlockShared(const HookContext* instance) // deprecated // -extern "C" DLLEXPORT HookContext* __cdecl CreateHookContext( - const USVFSParameters& oldParams, HMODULE module) +extern "C" DLLEXPORT HookContext* __cdecl +CreateHookContext(const USVFSParameters& oldParams, HMODULE module) { const usvfsParameters p(oldParams); return usvfsCreateHookContext(p, module); diff --git a/src/usvfs_dll/hooks/file_information_utils.h b/src/usvfs_dll/hooks/file_information_utils.h index dbd35974..6d11f095 100644 --- a/src/usvfs_dll/hooks/file_information_utils.h +++ b/src/usvfs_dll/hooks/file_information_utils.h @@ -16,8 +16,8 @@ namespace usvfs::details #define DECLARE_HAS_FIELD(Field) \ template \ - constexpr auto HasFieldImpl##Field(int)->decltype(std::declval().Field, void(), \ - std::true_type()) \ + constexpr auto HasFieldImpl##Field(int) \ + -> decltype(std::declval().Field, void(), std::true_type()) \ { \ return {}; \ } \ diff --git a/src/usvfs_dll/maptracker.h b/src/usvfs_dll/maptracker.h index 6ddf471b..ed8daafc 100644 --- a/src/usvfs_dll/maptracker.h +++ b/src/usvfs_dll/maptracker.h @@ -565,7 +565,7 @@ class CreateRerouter // check virtualized paths DWORD virtAttr = GetFileAttributesW(lpFileName); bool isFile = virtAttr != INVALID_FILE_ATTRIBUTES && - (virtAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; + (virtAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; m_isDir = virtAttr != INVALID_FILE_ATTRIBUTES && (virtAttr & FILE_ATTRIBUTE_DIRECTORY); diff --git a/test/tinjectlib_test/testinject_dll/main.h b/test/tinjectlib_test/testinject_dll/main.h index 6faf8002..7ddcc30b 100644 --- a/test/tinjectlib_test/testinject_dll/main.h +++ b/test/tinjectlib_test/testinject_dll/main.h @@ -3,8 +3,8 @@ #define WIN32_LEAN_AND_MEAN #include -extern "C" - __declspec(dllexport) void __cdecl InitNoQuit(LPVOID userData, size_t userDataSize); +extern "C" __declspec(dllexport) void __cdecl InitNoQuit(LPVOID userData, + size_t userDataSize); extern "C" __declspec(dllexport) void __cdecl InitNoParam(LPVOID userData, size_t userDataSize); extern "C" __declspec(dllexport) void __cdecl InitComplexParam(LPVOID userData, diff --git a/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp b/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp index 79c6c4c0..c9cdab92 100644 --- a/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp +++ b/test/usvfs_global_test_runner/usvfs_global_test/usvfs_global_test.cpp @@ -102,8 +102,8 @@ TEST(BasicTest, SimpleTest) } const auto doc_txt = data / "docs" / "doc.txt"; - HandleGuard hdl = CreateFileW(doc_txt.c_str(), GENERIC_READ, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); + HandleGuard hdl = CreateFileW(doc_txt.c_str(), GENERIC_READ, 0, nullptr, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); ASSERT_NE(INVALID_HANDLE_VALUE, (HANDLE)hdl); WCHAR filepath[1024]; @@ -134,8 +134,8 @@ TEST(BasicTest, SimpleTest) } const auto info_txt = data / "readme.txt"; - HandleGuard hdl = CreateFileW(info_txt.c_str(), GENERIC_READ, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); + HandleGuard hdl = CreateFileW(info_txt.c_str(), GENERIC_READ, 0, nullptr, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); ASSERT_NE(INVALID_HANDLE_VALUE, (HANDLE)hdl); char buffer[4096]; diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index 723deeed..937c81f9 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -2,19 +2,19 @@ "default-registry": { "kind": "git", "repository": "https://github.com/Microsoft/vcpkg", - "baseline": "294f76666c3000630d828703e675814c05a4fd43" + "baseline": "74e6536215718009aae747d86d84b78376bf9e09" }, "registries": [ { "kind": "git", "repository": "https://github.com/Microsoft/vcpkg", - "baseline": "294f76666c3000630d828703e675814c05a4fd43", + "baseline": "74e6536215718009aae747d86d84b78376bf9e09", "packages": ["boost*", "boost-*"] }, { "kind": "git", "repository": "https://github.com/ModOrganizer2/vcpkg-registry", - "baseline": "27d8adbfe9e4ce88a875be3a45fadab69869eb60", + "baseline": "92f063c71cebea1926c7eb183fbe719145395985", "packages": ["asmjit", "spdlog"] } ]