Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: sky/engine/tonic/dart_snapshot_loader.cc

Issue 1237973002: Remove most usage of Vector (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/tonic/dart_snapshot_loader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/tonic/dart_snapshot_loader.cc
diff --git a/sky/engine/tonic/dart_snapshot_loader.cc b/sky/engine/tonic/dart_snapshot_loader.cc
index 04b4de01a75836aae57d531a1bf2a8e72a9c3a35..9277da7ff01b141bbce088eb817c39de8b4c34e0 100644
--- a/sky/engine/tonic/dart_snapshot_loader.cc
+++ b/sky/engine/tonic/dart_snapshot_loader.cc
@@ -32,7 +32,8 @@ void DartSnapshotLoader::LoadSnapshot(mojo::ScopedDataPipeConsumerHandle pipe,
}
void DartSnapshotLoader::OnDataAvailable(const void* data, size_t num_bytes) {
- buffer_.append(static_cast<const uint8_t*>(data), num_bytes);
+ const uint8_t* bytes = static_cast<const uint8_t*>(data);
+ buffer_.insert(buffer_.end(), bytes, bytes + num_bytes);
}
void DartSnapshotLoader::OnDataComplete() {
« no previous file with comments | « sky/engine/tonic/dart_snapshot_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698