OLD | NEW |
(Empty) | |
| 1 diff --git a/third_party/re2/util/sparse_array.h b/third_party/re2/util/sparse_a
rray.h |
| 2 index 4ee5c94..7bc3a86 100644 |
| 3 --- a/third_party/re2/util/sparse_array.h |
| 4 +++ b/third_party/re2/util/sparse_array.h |
| 5 @@ -273,13 +273,13 @@ void SparseArray<Value>::resize(int new_max_size) { |
| 6 int* a = new int[new_max_size]; |
| 7 if (sparse_to_dense_) { |
| 8 memmove(a, sparse_to_dense_, max_size_*sizeof a[0]); |
| 9 - // Don't need to zero the memory but appease Valgrind. |
| 10 - if (valgrind_) { |
| 11 - for (int i = max_size_; i < new_max_size; i++) |
| 12 - a[i] = 0xababababU; |
| 13 - } |
| 14 delete[] sparse_to_dense_; |
| 15 } |
| 16 + // Don't need to zero the memory but appease Valgrind. |
| 17 + if (valgrind_) { |
| 18 + for (int i = max_size_; i < new_max_size; i++) |
| 19 + a[i] = 0xababababU; |
| 20 + } |
| 21 sparse_to_dense_ = a; |
| 22 |
| 23 dense_.resize(new_max_size); |
OLD | NEW |