refactor(Core/Misc): add braces and impove codestyle (#6402)

This commit is contained in:
Kargatum
2021-06-25 00:50:18 +07:00
committed by GitHub
parent 33c271cc7c
commit 3c24b511f2
72 changed files with 1486 additions and 401 deletions

View File

@@ -123,7 +123,9 @@ bool WinServiceUninstall()
if (QueryServiceStatus(service, &serviceStatus2))
{
if (serviceStatus2.dwCurrentState == SERVICE_STOPPED)
{
DeleteService(service);
}
}
CloseServiceHandle(service);
}
@@ -163,10 +165,14 @@ void WINAPI ServiceControlHandler(DWORD controlCode)
default:
if ( controlCode >= 128 && controlCode <= 255 )
// user defined control code
{
break;
}
else
// unrecognized control code
{
break;
}
}
SetServiceStatus(serviceStatusHandle, &serviceStatus);
@@ -194,7 +200,7 @@ void WINAPI ServiceMain(DWORD argc, char* argv[])
for (i = 0; i < std::strlen(path); i++)
{
if (path[i] == '\\') last_slash = i;
if (path[i] == '\\') { last_slash = i; }
}
path[last_slash] = 0;