Commit 407252f1 by Loo Rong Jie

Update comment and use std::numeric_limits<Dword>::max()

parent 44976eb3
...@@ -116,10 +116,10 @@ class KernelTimeout { ...@@ -116,10 +116,10 @@ class KernelTimeout {
// in the case of a spurious wakeup). // in the case of a spurious wakeup).
// This header file may be included transitively by public header files, // This header file may be included transitively by public header files,
// so we define our own DWORD and INFINITE instead of getting them from // so we define our own DWORD and INFINITE instead of getting them from
// <intsafe.h>. // <intsafe.h> and <WinBase.h>.
typedef unsigned long DWord; typedef unsigned long DWord;
DWord InMillisecondsFromNow() const { DWord InMillisecondsFromNow() const {
constexpr DWord kInfinite = static_cast<DWord>(-1); constexpr DWord kInfinite = std::numeric_limits<DWord>::max();
if (!has_timeout()) { if (!has_timeout()) {
return kInfinite; return kInfinite;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment