about summary refs log tree commit diff
path: root/absl/synchronization/internal
diff options
context:
space:
mode:
authorLoo Rong Jie <loorongjie@gmail.com>2018-07-18T01·53+0800
committerLoo Rong Jie <loorongjie@gmail.com>2018-07-18T01·53+0800
commit407252f121bf219c8437f3393b9adc2e8bceaae2 (patch)
tree9283e6a4391e5f3cd3bbebf17813cd04c003ea04 /absl/synchronization/internal
parent44976eb3bc5f796eff68d5ffeebedaeccbf7afcc (diff)
Update comment and use std::numeric_limits<Dword>::max()
Diffstat (limited to 'absl/synchronization/internal')
-rw-r--r--absl/synchronization/internal/kernel_timeout.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/synchronization/internal/kernel_timeout.h b/absl/synchronization/internal/kernel_timeout.h
index 8b2b8d684f6f..0e50fa6d771b 100644
--- a/absl/synchronization/internal/kernel_timeout.h
+++ b/absl/synchronization/internal/kernel_timeout.h
@@ -116,10 +116,10 @@ class KernelTimeout {
   // in the case of a spurious wakeup).
   // This header file may be included transitively by public header files,
   // so we define our own DWORD and INFINITE instead of getting them from
-  // <intsafe.h>.
+  // <intsafe.h> and <WinBase.h>.
   typedef unsigned long DWord;
   DWord InMillisecondsFromNow() const {
-    constexpr DWord kInfinite = static_cast<DWord>(-1);
+    constexpr DWord kInfinite = std::numeric_limits<DWord>::max();
     if (!has_timeout()) {
       return kInfinite;
     }