Skip to content

Commit

Permalink
chore: attempted fix for compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Mar 11, 2019
1 parent 13126ec commit de7ffec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 0 additions & 8 deletions deps/v8/src/zone/zone-list-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ void ZoneList<T>::Iterate(Visitor* visitor) {
for (int i = 0; i < length_; i++) visitor->Apply(&data_[i]);
}

template <typename T>
bool ZoneList<T>::Contains(const T& elm) const {
for (int i = 0; i < length_; i++) {
if (data_[i] == elm) return true;
}
return false;
}

template <typename T>
template <typename CompareFunction>
void ZoneList<T>::Sort(CompareFunction cmp) {
Expand Down
7 changes: 6 additions & 1 deletion deps/v8/src/zone/zone.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,12 @@ class ZoneList final {
// Drops all but the first 'pos' elements from the list.
INLINE(void Rewind(int pos));

inline bool Contains(const T& elm) const;
inline bool Contains(const T& elm) const {
for (int i = 0; i < length_; i++) {
if (data_[i] == elm) return true;
}
return false;
}

// Iterate through all list entries, starting at index 0.
template <class Visitor>
Expand Down

0 comments on commit de7ffec

Please sign in to comment.