projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1e5151
)
Make sure there is no signed int overflow
author
Anton Korobeynikov
<anton@korobeynikov.info>
Sat, 13 Oct 2012 21:39:24 +0000
(
01:39
+0400)
committer
Jordan DeLong
<jdelong@fb.com>
Sat, 19 Jan 2013 00:37:12 +0000
(16:37 -0800)
Summary: use proper type for index.
Test Plan: .
Reviewed By: tudorb@fb.com
FB internal diff:
D660142
folly/small_vector.h
patch
|
blob
|
history
diff --git
a/folly/small_vector.h
b/folly/small_vector.h
index cf9caa6e5ac87eb290bcd5d9b77e9e8832df7c54..45697b865aff6b3df00606f6b632d8e99b7a208f 100644
(file)
--- a/
folly/small_vector.h
+++ b/
folly/small_vector.h
@@
-205,7
+205,7
@@
namespace detail {
void populateMemForward(T* mem, std::size_t n, Function const& op) {
std::size_t idx = 0;
try {
- for (
in
t i = 0; i < n; ++i) {
+ for (
size_
t i = 0; i < n; ++i) {
op(&mem[idx]);
++idx;
}