Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions src/shared/ntdll_declarations.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/thooklib/hooklib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<intptr_t>(destination) -
(reinterpret_cast<intptr_t>(jumpAddr) + 5);
intptr_t dist = reinterpret_cast<intptr_t>(destination) -
(reinterpret_cast<intptr_t>(jumpAddr) + 5);
int32_t distShort = static_cast<int32_t>(dist);
#else
int32_t distShort = reinterpret_cast<intptr_t>(destination) -
Expand Down
4 changes: 2 additions & 2 deletions src/usvfs_dll/hookcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/usvfs_dll/hooks/file_information_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ namespace usvfs::details

#define DECLARE_HAS_FIELD(Field) \
template <typename T> \
constexpr auto HasFieldImpl##Field(int)->decltype(std::declval<T>().Field, void(), \
std::true_type()) \
constexpr auto HasFieldImpl##Field(int) \
-> decltype(std::declval<T>().Field, void(), std::true_type()) \
{ \
return {}; \
} \
Expand Down
2 changes: 1 addition & 1 deletion src/usvfs_dll/maptracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions test/tinjectlib_test/testinject_dll/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down
6 changes: 3 additions & 3 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
]
Expand Down
Loading