Auto-Submit | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Code-Review | +1 |
GCInfoTrait<T>::CheckCallbacksAreDefined() &&
Do these still need to return true? I guess we can just call these methods with the same result?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
GCInfoTrait<T>::CheckCallbacksAreDefined() &&
Do these still need to return true? I guess we can just call these methods with the same result?
true, it doesn't have to return anything. `if constexpr` serves that the functions are not instantiated for types that don't satisfy the condition.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: include/cppgc/internal/gc-info.h
Insertions: 3, Deletions: 5.
@@ -94,12 +94,11 @@
return index;
}
- static constexpr bool CheckCallbacksAreDefined() {
+ static constexpr void CheckCallbacksAreDefined() {
// No USE() macro available.
(void)static_cast<TraceCallback>(TraceTrait<T>::Trace);
(void)static_cast<FinalizationCallback>(FinalizerTrait<T>::kCallback);
(void)static_cast<NameCallback>(NameTrait<T>::GetName);
- return true;
}
};
@@ -132,9 +131,8 @@
kBothTypesAreTriviallyDestructible ||
kHasCustomFinalizerDispatchAtBase) &&
!kWantsDetailedObjectNames) {
- GCInfoTrait<T>::CheckCallbacksAreDefined() &&
- GCInfoTrait<
- ParentMostGarbageCollectedType>::CheckCallbacksAreDefined();
+ GCInfoTrait<T>::CheckCallbacksAreDefined();
+ GCInfoTrait<ParentMostGarbageCollectedType>::CheckCallbacksAreDefined();
return true;
}
return false;
```
cppgc: Short-circuit callback checking in GCInfo
If gc-info for child is unfolded, we don't actually have to try to
call the parent's dtor, which can be e.g. protected.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |