8255389: ConcurrentHashTable::NoOp omits return in non-void return method

Reviewed-by: kbarrett, rehn
This commit is contained in:
Aleksey Shipilev 2020-10-27 08:16:43 +00:00
parent d735f91919
commit dccfd2b3e0

View File

@ -191,13 +191,6 @@ class ConcurrentHashTable : public CHeapObj<F> {
Bucket* get_bucket(size_t idx) { return &_buckets[idx]; }
};
// Used as default functor when no functor supplied for some methods.
struct NoOp {
void operator()(VALUE*) {}
const VALUE& operator()() {}
void operator()(bool, VALUE*) {}
} noOp;
// For materializing a supplied value.
class LazyValueRetrieve {
private:
@ -429,7 +422,10 @@ class ConcurrentHashTable : public CHeapObj<F> {
// Same without DELETE_FUNC.
template <typename LOOKUP_FUNC>
bool remove(Thread* thread, LOOKUP_FUNC& lookup_f) {
return internal_remove(thread, lookup_f, noOp);
struct {
void operator()(VALUE*) {}
} ignore_del_f;
return internal_remove(thread, lookup_f, ignore_del_f);
}
// Visit all items with SCAN_FUNC if no concurrent resize. Takes the resize