Commit e5baaa96 authored by Anton Korobeynikov's avatar Anton Korobeynikov Committed by Jordan DeLong

Make sure there is no signed int overflow

Summary: use proper type for index.

Test Plan: .

Reviewed By: tudorb@fb.com

FB internal diff: D660142
parent c1e51516
......@@ -205,7 +205,7 @@ namespace detail {
void populateMemForward(T* mem, std::size_t n, Function const& op) {
std::size_t idx = 0;
try {
for (int i = 0; i < n; ++i) {
for (size_t i = 0; i < n; ++i) {
op(&mem[idx]);
++idx;
}
......
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