Skip to content

Commit

Permalink
Merge pull request #3 from merly-ai/win64_support
Browse files Browse the repository at this point in the history
fixing minor issue with min/max, and warnings
  • Loading branch information
urs-muff authored Feb 24, 2022
2 parents 535b537 + 887327a commit 1458d88
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cpp/subprocess/ProcessBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ namespace subprocess {
int Popen::wait(double timeout) {
if (returncode != kBadReturnCode)
return returncode;
DWORD ms = timeout < 0? INFINITE : timeout*1000.0;
DWORD ms = timeout < 0 ? INFINITE : (DWORD)(timeout*1000.0);
DWORD result = WaitForSingleObject(process_info.hProcess, ms);
if (result == WAIT_TIMEOUT) {
throw TimeoutExpired("timeout of " + std::to_string(ms) + " expired");
Expand Down
1 change: 1 addition & 0 deletions src/cpp/subprocess/basic_types.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#ifdef _WIN32
#define NOMINMAX
#include <windows.h>
#else
#include <unistd.h>
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/subprocess/shell_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace {
if (path.empty())
return false;
return std::filesystem::is_regular_file(path);
} catch (std::filesystem::filesystem_error& e) {
} catch (std::filesystem::filesystem_error&) {
return false;
}
}
Expand Down

0 comments on commit 1458d88

Please sign in to comment.