projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix nextPowTwo for 64-bit values under MSVC
[folly.git]
/
folly
/
Bits.h
diff --git
a/folly/Bits.h
b/folly/Bits.h
index 3bf1e32954c9d48bf90f1aea30077f86ad4ce7f9..e974c91d3ae46073b21a155a9ab7cb7e5bb1503d 100644
(file)
--- a/
folly/Bits.h
+++ b/
folly/Bits.h
@@
-185,7
+185,7
@@
typename std::enable_if<
std::is_integral<T>::value && std::is_unsigned<T>::value,
T>::type
nextPowTwo(T v) {
- return v ? (
1ul
<< findLastSet(v - 1)) : 1;
+ return v ? (
T(1)
<< findLastSet(v - 1)) : 1;
}
template <class T>