Chromium Code Reviews| Index: runtime/vm/growable_array.h |
| =================================================================== |
| --- runtime/vm/growable_array.h (revision 11934) |
| +++ runtime/vm/growable_array.h (working copy) |
| @@ -89,6 +89,15 @@ |
| data_[idx] = value; |
| } |
| + bool Contains(const T& value) { |
|
Kevin Millikin (Google)
2012/09/06 12:42:42
I actually like not having this function defined :
Florian Schneider
2012/09/06 13:05:53
Done.
|
| + for (intptr_t i = 0; i < length(); i++) { |
| + if (data_[i] == value) { |
| + return true; |
| + } |
| + } |
| + return false; |
| + } |
| + |
| // Sort the array in place. |
| inline void Sort(int compare(const T*, const T*)); |