Test Plan: build with -Wsign-compare, no warnings
Reviewed By: njormrod@fb.com
FB internal diff:
D1193502
}
size_t smallSize() const {
- assert(category() == isSmall && small_[maxSmallSize] <= maxSmallSize);
+ assert(category() == isSmall &&
+ static_cast<size_t>(small_[maxSmallSize])
+ <= static_cast<size_t>(maxSmallSize));
return static_cast<size_t>(maxSmallSize)
- static_cast<size_t>(small_[maxSmallSize]);
}
return id;
}
- static void destroy(int id) {
+ static void destroy(size_t id) {
try {
auto & meta = instance();
// Elements in other threads that use this id.
#endif
}
- static ElementWrapper& get(int id) {
+ static ElementWrapper& get(size_t id) {
ThreadEntry* threadEntry = getThreadEntry();
if (UNLIKELY(threadEntry->elementsCapacity <= id)) {
reserve(id);
} // namespace folly
#endif /* FOLLY_DETAIL_THREADLOCALDETAIL_H_ */
-