[webkit-reviews] review denied: [Bug 193056] Prefer RetainPtr<NSObject> to RetainPtr<NSObject *> : [Attachment 358136] Patch v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 29 10:01:15 PST 2018


David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has denied David Kilzer
(:ddkilzer) <ddkilzer at webkit.org>'s request for review:
Bug 193056: Prefer RetainPtr<NSObject> to RetainPtr<NSObject *>
https://bugs.webkit.org/show_bug.cgi?id=193056

Attachment 358136: Patch v1

https://bugs.webkit.org/attachment.cgi?id=358136&action=review




--- Comment #4 from David Kilzer (:ddkilzer) <ddkilzer at webkit.org> ---
Comment on attachment 358136
  --> https://bugs.webkit.org/attachment.cgi?id=358136
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=358136&action=review

>> Source/WTF/wtf/RetainPtr.h:60
>> +template<typename T> RetainPtr<typename
std::conditional<std::is_convertible<T, id>::value && !std::is_same<T,
id>::value, typename std::remove_pointer<T>::type, T>::type> adoptNS(T
NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
> 
> After posting this patch, I just realized I might be able to do something
simpler which matches the way that ValueType is defined:
> 
> -template<typename T> RetainPtr<typename
std::conditional<std::is_convertible<T, id>::value && !std::is_same<T,
id>::value, typename std::remove_pointer<T>::type, T>::type> adoptNS(T
NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
> +template<typename T> RetainPtr<typename std::remove_pointer<T>::type>
adoptNS(T NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN;
> 
> Testing now.

Yes this can be simplified.  Making some changes now.


More information about the webkit-reviews mailing list