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

Unified Diff: runtime/vm/growable_array.h

Issue 1410493002: Complete support for Windows TLS destructors (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | runtime/vm/os_thread.h » ('j') | runtime/vm/os_thread_win.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/growable_array.h
diff --git a/runtime/vm/growable_array.h b/runtime/vm/growable_array.h
index 9023948c605d500229b97a8f59ed45bc9e805741..174e20c86dbe4ae3c54659262dda48d68e87adc9 100644
--- a/runtime/vm/growable_array.h
+++ b/runtime/vm/growable_array.h
@@ -110,6 +110,16 @@ class BaseGrowableArray : public B {
data_[j] = temp;
}
+ // NOTE: Does not preserve array order.
+ void RemoveAt(intptr_t i) {
+ ASSERT(i >= 0);
+ ASSERT(i < length_);
+ if (i < length_ - 1) {
siva 2015/10/15 22:42:48 if (i < (length_ -1)) { for better readability.
Cutch 2015/10/16 16:53:25 Done.
+ Swap(i, length_ - 1);
+ }
+ RemoveLast();
+ }
+
// The content is uninitialized after calling it.
void SetLength(intptr_t new_length);
« no previous file with comments | « no previous file | runtime/vm/os_thread.h » ('j') | runtime/vm/os_thread_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698