projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8dd97c8
)
Make sure the op does not change the sign of the operand
author
Anton Korobeynikov
<anton@korobeynikov.info>
Sat, 13 Oct 2012 21:40:58 +0000
(
01:40
+0400)
committer
Jordan DeLong
<jdelong@fb.com>
Sat, 19 Jan 2013 00:36:58 +0000
(16:36 -0800)
Summary: .
Test Plan: .
Reviewed By: soren@fb.com
FB internal diff:
D660143
Blame Revision:
folly/small_vector.h
patch
|
blob
|
history
diff --git
a/folly/small_vector.h
b/folly/small_vector.h
index 911f0630fc936439c31bfffbcf96c264aef9b649..cf9caa6e5ac87eb290bcd5d9b77e9e8832df7c54 100644
(file)
--- a/
folly/small_vector.h
+++ b/
folly/small_vector.h
@@
-414,7
+414,8
@@
namespace detail {
}
template <class T>
T* pointerFlagClear(T* p) {
- return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) & ~1);
+ return reinterpret_cast<T*>(
+ reinterpret_cast<uintptr_t>(p) & ~uintptr_t(1));
}
inline void* shiftPointer(void* p, size_t sizeBytes) {
return static_cast<char*>(p) + sizeBytes;