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

Unified Diff: src/PNaClTranslator.cpp

Issue 1783113002: Subzero: Improve the behavior of resizing vectors. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 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 | « src/IceUtils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index 595b2340eb515b1ed3878e3596ebecc26e2bded0..5e76a6acc928a08f822afc95cf6e2a7786e31f71 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -275,7 +275,7 @@ public:
// Recover by using existing type slot.
return &TypeIDValues[0];
}
- TypeIDValues.resize(ID + 1);
+ Ice::Utils::reserveAndResize(TypeIDValues, ID + 1);
}
return &TypeIDValues[ID];
}
@@ -1566,7 +1566,7 @@ private:
// Recover by using index one beyond the maximal allowed.
LocalIndex = MaxRecordsInBlock;
}
- LocalOperands.resize(LocalIndex + 1);
+ Ice::Utils::reserveAndResize(LocalOperands, LocalIndex + 1);
}
// If element not defined, set it.
« no previous file with comments | « src/IceUtils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698