[LINT] Linted files + Added lint job to CI

This commit is contained in:
Gliniak
2024-03-12 08:59:10 +01:00
committed by Radosław Gliński
parent e8afad8f8a
commit b9061e6292
117 changed files with 1177 additions and 883 deletions

View File

@@ -44,21 +44,21 @@
ntdll versions of functions often skip through a lot of extra garbage in
KernelBase
*/
#define XE_NTDLL_IMPORT(name, cls, clsvar) \
static class cls { \
public: \
FARPROC fn; \
cls() : fn(nullptr) { \
auto ntdll = GetModuleHandleA("ntdll.dll"); \
if (ntdll) { \
fn = GetProcAddress(ntdll, #name); \
} \
} \
template <typename TRet = void, typename... TArgs> \
inline TRet invoke(TArgs... args) { \
return reinterpret_cast<TRet(NTAPI*)(TArgs...)>(fn)(args...); \
} \
inline operator bool() const { return fn != nullptr; } \
#define XE_NTDLL_IMPORT(name, cls, clsvar) \
static class cls { \
public: \
FARPROC fn; \
cls() : fn(nullptr) { \
auto ntdll = GetModuleHandleA("ntdll.dll"); \
if (ntdll) { \
fn = GetProcAddress(ntdll, #name); \
} \
} \
template <typename TRet = void, typename... TArgs> \
inline TRet invoke(TArgs... args) { \
return reinterpret_cast<TRet(NTAPI*)(TArgs...)>(fn)(args...); \
} \
inline operator bool() const { return fn != nullptr; } \
} clsvar
#else
#define XE_NTDLL_IMPORT(name, cls, clsvar) static constexpr bool clsvar = false