mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8230841: Remove oopDesc::equals()
Reviewed-by: rkennke, tschatzl
This commit is contained in:
parent
cb50d3b4f3
commit
2d6874b861
52 changed files with 119 additions and 132 deletions
|
@ -218,15 +218,6 @@ template<class E> class GrowableArray : public GenericGrowableArray {
|
|||
|
||||
void print();
|
||||
|
||||
inline static bool safe_equals(oop obj1, oop obj2) {
|
||||
return oopDesc::equals(obj1, obj2);
|
||||
}
|
||||
|
||||
template <class X>
|
||||
inline static bool safe_equals(X i1, X i2) {
|
||||
return i1 == i2;
|
||||
}
|
||||
|
||||
int append(const E& elem) {
|
||||
check_nesting();
|
||||
if (_len == _max) grow(_len);
|
||||
|
@ -311,7 +302,7 @@ template<class E> class GrowableArray : public GenericGrowableArray {
|
|||
|
||||
bool contains(const E& elem) const {
|
||||
for (int i = 0; i < _len; i++) {
|
||||
if (safe_equals(_data[i], elem)) return true;
|
||||
if (_data[i] == elem) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue