Skip to content

Commit f3adbe5

Browse files
committed
linting fixes
1 parent 54357ac commit f3adbe5

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

src/console.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace pluginloader::console {
66

77
void create_if_needed(void) {
8-
std::string args{GetCommandLineA()};
8+
const std::string args{GetCommandLineA()};
99
if (args.find("--debug") == std::string::npos) {
1010
return;
1111
}

src/loader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef LOADER_H
22
#define LOADER_H
33

4+
#include "pch.h"
5+
46
namespace pluginloader::loader {
57

68
/**

src/pch.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
#define WIN32_LEAN_AND_MEAN
55
#define NOMINMAX
6-
#include <Windows.h>
6+
#include <windows.h>
77

8-
#include <TlHelp32.h>
8+
#include <tlhelp32.h>
99

1010
#ifdef __cplusplus
1111

src/proxy/d3d11.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ DLL_EXPORT HRESULT D3D11CreateDeviceAndSwapChain(void* adapt,
6262

6363
void init(HMODULE /*this_dll*/) {
6464
// Suspend all other threads to prevent a giant race condition
65-
util::ThreadSuspender suspender{};
65+
const util::ThreadSuspender suspender{};
6666

6767
wchar_t buf[MAX_PATH];
6868
if (GetSystemDirectoryW(&buf[0], ARRAYSIZE(buf)) == 0) {
6969
std::cerr << "[dhf] Unable to find system dll directory! We're probably about to crash.\n";
7070
return;
7171
}
7272

73-
auto system_dx11 = std::filesystem::path{buf} / "d3d11.dll";
73+
auto system_dx11 = std::filesystem::path{static_cast<wchar_t*>(buf)} / "d3d11.dll";
7474
dx11_dll_handle = LoadLibraryA(system_dx11.generic_string().c_str());
7575

7676
d3d11_core_create_device_ptr = GetProcAddress(dx11_dll_handle, "D3D11CoreCreateDevice");

src/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace pluginloader::util {
55

66
std::string format_win_error(DWORD err) {
77
LPSTR buf = nullptr;
8-
size_t size = FormatMessageA(
8+
const size_t size = FormatMessageA(
99
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
1010
nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast<LPSTR>(&buf), 0,
1111
nullptr);

src/util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef UTIL_H
22
#define UTIL_H
33

4+
#include "pch.h"
5+
46
namespace pluginloader::util {
57

68
/**

0 commit comments

Comments
 (0)