./accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1512:12: error: cannot initialize return object of type 'BOOL' (aka 'signed char') with an rvalue of type 'WebCore::AXCoreObject *' return Accessibility::findAncestor<AXCoreObject>(*self.axBackingObject, false, [] (const AXCoreObject& object) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1522:12: error: cannot initialize return object of type 'BOOL' (aka 'signed char') with an rvalue of type 'WebCore::AXCoreObject *'
<rdar://problem/65366125>
Created attachment 404006 [details] patch
wouldn't !(!) work here as well?
(In reply to zalan from comment #3) > wouldn't !(!) work here as well? I think so but isn't comparing against nullptr more clear?
Committed r264243: <https://trac.webkit.org/changeset/264243> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404006 [details].
(In reply to chris fleizach from comment #4) > (In reply to zalan from comment #3) > > wouldn't !(!) work here as well? > > I think so but isn't comparing against nullptr more clear? WebKit prefers it the other way around (instead of [if (foo != nullptr)] we usually go like [if (!foo)])
(In reply to zalan from comment #6) > (In reply to chris fleizach from comment #4) > > (In reply to zalan from comment #3) > > > wouldn't !(!) work here as well? > > > > I think so but isn't comparing against nullptr more clear? > WebKit prefers it the other way around (instead of [if (foo != nullptr)] we > usually go like [if (!foo)]) So in this case you think return !(!Accessibility::findAncestor<AXCoreObject>(*self.axBackingObject, false, [] (const AXCoreObject& object) { return object.roleValue() == AccessibilityRole::DescriptionListTerm; })); would be better suited?
(In reply to chris fleizach from comment #7) > (In reply to zalan from comment #6) > > (In reply to chris fleizach from comment #4) > > > (In reply to zalan from comment #3) > > > > wouldn't !(!) work here as well? > > > > > > I think so but isn't comparing against nullptr more clear? > > WebKit prefers it the other way around (instead of [if (foo != nullptr)] we > > usually go like [if (!foo)]) > > So in this case you think > > return !(!Accessibility::findAncestor<AXCoreObject>(*self.axBackingObject, > false, [] (const AXCoreObject& object) { > return object.roleValue() == AccessibilityRole::DescriptionListTerm; > })); > > would be better suited? Yeah, I would change it to !!Accessibility::findAncestor as a drive-by fix whenever you make some changes in here.
(In reply to zalan from comment #8) > (In reply to chris fleizach from comment #7) > > (In reply to zalan from comment #6) > > > (In reply to chris fleizach from comment #4) > > > > (In reply to zalan from comment #3) > > > > > wouldn't !(!) work here as well? > > > > > > > > I think so but isn't comparing against nullptr more clear? > > > WebKit prefers it the other way around (instead of [if (foo != nullptr)] we > > > usually go like [if (!foo)]) > > > > So in this case you think > > > > return !(!Accessibility::findAncestor<AXCoreObject>(*self.axBackingObject, > > false, [] (const AXCoreObject& object) { > > return object.roleValue() == AccessibilityRole::DescriptionListTerm; > > })); > > > > would be better suited? > Yeah, I would change it to !!Accessibility::findAncestor as a drive-by fix > whenever you make some changes in here. Noted