Index: src/serialize.cc |
diff --git a/src/serialize.cc b/src/serialize.cc |
index a7cfda8667b2306fcf2db63ff7e9ab50f17eb2e2..00405dda91a2999739b6fa45fcff3ce435c90e35 100644 |
--- a/src/serialize.cc |
+++ b/src/serialize.cc |
@@ -508,9 +508,7 @@ void Deserializer::DecodeReservation( |
DCHECK_EQ(0, reservations_[NEW_SPACE].length()); |
STATIC_ASSERT(NEW_SPACE == 0); |
int current_space = NEW_SPACE; |
- for (int i = 0; i < res.length(); i++) { |
- SerializedData::Reservation r(0); |
- memcpy(&r, res.start() + i, sizeof(r)); |
+ for (auto& r : res) { |
reservations_[current_space].Add({r.chunk_size(), NULL, NULL}); |
if (r.is_last()) current_space++; |
} |