Skip to content

Commit 5dfc598

Browse files
fix: try fix compile errors
1 parent 6bd547d commit 5dfc598

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

main.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ std::string WideToString(const std::wstring& wstr);
111111
void EnsureCurrentParentExe(hSnapshot) {
112112
if (!currentParentExe.empty()) return;
113113

114-
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
115-
if (hSnapshot == INVALID_HANDLE_VALUE) return;
114+
116115

117116
PROCESSENTRY32 pe32{};
118117
pe32.dwSize = sizeof(PROCESSENTRY32);
@@ -2142,7 +2141,7 @@ int main(int argc, char* argv[]) {
21422141
// snapshot of all processes in the system first so we can pass it to every function from there on
21432142

21442143
HANDLE hshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
2145-
if (INVALID_HANDLE_VALUE == hSnapshot) return {};
2144+
if (INVALID_HANDLE_VALUE == hSnapshot) {return {}};
21462145
PIDinspect(pids, trash, hshot);
21472146
} else {
21482147
if (IsVirtualTerminalModeEnabled()) { // ugh i have to do this EVERY SINGLE TIME
@@ -2162,7 +2161,7 @@ int main(int argc, char* argv[]) {
21622161
else if (arg[0] != '-') { // if it doesn't start with -- or -
21632162
std::string procName = arg;
21642163
HANDLE hshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
2165-
if (INVALID_HANDLE_VALUE == hSnapshot) return {};
2164+
if (INVALID_HANDLE_VALUE == hSnapshot) {return {}};
21662165
ProcInfos r = findMyProc(procName.c_str(), hshot);
21672166
if (!r.pids.empty()) {
21682167
std::vector<DWORD> dwPids(r.pids.begin(), r.pids.end());

0 commit comments

Comments
 (0)