[webkit-reviews] review granted: [Bug 176456] Add modern decoders for POD types : [Attachment 320019] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 6 10:04:58 PDT 2017
Geoffrey Garen <ggaren at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 176456: Add modern decoders for POD types
https://bugs.webkit.org/show_bug.cgi?id=176456
Attachment 320019: Patch
https://bugs.webkit.org/attachment.cgi?id=320019&action=review
--- Comment #2 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 320019
--> https://bugs.webkit.org/attachment.cgi?id=320019
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=320019&action=review
r=me
> Source/WebKit/Platform/IPC/Decoder.cpp:241
> +Decoder& Decoder::operator>>(std::optional<bool>& optional)
> +{
> + return getOptional(optional);
> +}
> +
> +Decoder& Decoder::operator>>(std::optional<uint8_t>& optional)
> +{
> + return getOptional(optional);
> +}
> +
> +Decoder& Decoder::operator>>(std::optional<uint16_t>& optional)
> +{
> + return getOptional(optional);
> +}
> +
> +Decoder& Decoder::operator>>(std::optional<uint32_t>& optional)
> +{
> + return getOptional(optional);
> +}
> +
> +Decoder& Decoder::operator>>(std::optional<uint64_t>& optional)
> +{
> + return getOptional(optional);
> +}
> +
> +Decoder& Decoder::operator>>(std::optional<int32_t>& optional)
> +{
> + return getOptional(optional);
> +}
> +
> +Decoder& Decoder::operator>>(std::optional<int64_t>& optional)
> +{
> + return getOptional(optional);
> +}
> +
> +Decoder& Decoder::operator>>(std::optional<float>& optional)
> +{
> + return getOptional(optional);
> +}
Kind of weird that our idiom is to use overloading instead of a template
parameter for these >> functions and for our decode functions.
If we're just trying to verify that our type is a POD type, we can use
std::is_pod.
More information about the webkit-reviews
mailing list