Commit 36eb4497 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

Address ConstructorCallback -Werror,-Wsign-compare

Summary: Address ConstructorCallback -Werror,-Wsign-compare

Reviewed By: ispeters, luciang

Differential Revision: D31625450

fbshipit-source-id: d5be388fc0d62eb715b5a8fe8e5758a8345cbbb0
parent be319ae4
......@@ -107,7 +107,7 @@ class ConstructorCallback {
*
* NOTE that nCBs > 0 will always imply that callbacks_ is non-nullptr
*/
for (int i = 0; i < nCBs; i++) {
for (size_t i = 0; i < nCBs; i++) {
(*This::callbacks_)[i](t);
}
}
......@@ -160,12 +160,12 @@ class ConstructorCallback {
static This::CallbackArray* getCallbackArray();
static This::CallbackArray* callbacks_;
static std::atomic<int> nConstructorCallbacks_;
static std::atomic<size_t> nConstructorCallbacks_;
};
template <class T, std::size_t MaxCallbacks>
std::atomic<int> ConstructorCallback<T, MaxCallbacks>::nConstructorCallbacks_{
0};
std::atomic<size_t>
ConstructorCallback<T, MaxCallbacks>::nConstructorCallbacks_{0};
template <class T, std::size_t MaxCallbacks>
folly::SharedMutex& ConstructorCallback<T, MaxCallbacks>::getMutex() {
......
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