From 407252f121bf219c8437f3393b9adc2e8bceaae2 Mon Sep 17 00:00:00 2001 From: Loo Rong Jie Date: Wed, 18 Jul 2018 09:53:05 +0800 Subject: Update comment and use std::numeric_limits::max() --- absl/synchronization/internal/kernel_timeout.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'absl/synchronization/internal/kernel_timeout.h') diff --git a/absl/synchronization/internal/kernel_timeout.h b/absl/synchronization/internal/kernel_timeout.h index 8b2b8d6..0e50fa6 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 - // . + // and . typedef unsigned long DWord; DWord InMillisecondsFromNow() const { - constexpr DWord kInfinite = static_cast(-1); + constexpr DWord kInfinite = std::numeric_limits::max(); if (!has_timeout()) { return kInfinite; } -- cgit v1.2.3