Skip to content

Commit 1c71efe

Browse files
committed
Small adjustments per code review.
1 parent 8f15daa commit 1c71efe

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

inc/osvr/Util/ProcessUtils.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,18 @@ OSVR_INLINE OSVR_ReturnCode osvrStartProcess(const char* executablePath, const c
5353
return OSVR_RETURN_FAILURE;
5454
#else
5555
#if defined(OSVR_WINDOWS)
56-
STARTUPINFO startupInfo;
57-
PROCESS_INFORMATION processInfo;
58-
memset(&startupInfo, 0, sizeof(startupInfo));
59-
memset(&processInfo, 0, sizeof(processInfo));
56+
STARTUPINFO startupInfo = { 0 };
57+
PROCESS_INFORMATION processInfo = { 0 };
58+
6059
startupInfo.dwFlags |= STARTF_USESHOWWINDOW;
6160
startupInfo.wShowWindow = SW_SHOW;
62-
if (!CreateProcess(executablePath, NULL, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL,
61+
if (!CreateProcess(executablePath, nullptr, nullptr, nullptr, FALSE, CREATE_NEW_CONSOLE, nullptr,
6362
workingDirectory, &startupInfo, &processInfo)) {
6463
OSVR_DEV_VERBOSE("Could not start process.");
6564
return OSVR_RETURN_FAILURE;
6665
}
6766
#else
68-
OSVR_DEV_VERBOSE("osvrStartProces not yet implemented for non-Windows platforms");
67+
OSVR_DEV_VERBOSE("osvrStartProcess not yet implemented for non-Windows platforms");
6968
return OSVR_RETURN_FAILURE;
7069
// UNTESTED (or even compiled)
7170
//pid_t pid = fork();

src/osvr/ClientKit/ServerAutoStartC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ void osvrClientAttemptServerAutoStart()
4242
// @todo implement auto-start for android
4343
#else
4444
auto server = osvr::client::getServerBinaryDirectoryPath();
45-
if (server.is_initialized()) {
45+
if (server) {
4646
OSVR_DEV_VERBOSE("Attempting to auto-start OSVR server from path " << *server);
4747
auto exePath = osvr::client::getServerLauncherBinaryPath();
48-
if (!exePath.is_initialized()) {
48+
if (!exePath) {
4949
OSVR_DEV_VERBOSE("No server launcher binary available.");
5050
return;
5151
}

0 commit comments

Comments
 (0)