Commit d43eaf2b authored by drivehappy's avatar drivehappy Committed by Feng Xiao

Fix gcc warning when using map (#2213)

* Issue #2211: Addressing GCC warning on enumeral/non-enumeral in conditional expression.

* Updated per 80 character wrap.
parent 58599320
......@@ -1290,7 +1290,9 @@ class Map {
// Return a power of two no less than max(kMinTableSize, n).
// Assumes either n < kMinTableSize or n is a power of two.
size_type TableSize(size_type n) {
return n < kMinTableSize ? kMinTableSize : n;
return n < static_cast<size_type>(kMinTableSize)
? static_cast<size_type>(kMinTableSize)
: n;
}
// Use alloc_ to allocate an array of n objects of type U.
......
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