[webkit-reviews] review granted: [Bug 137738] Move TextCodec classes to std::unique_ptr : [Attachment 239864] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 15 09:39:36 PDT 2014
Darin Adler <darin at apple.com> has granted Gyuyoung Kim
<gyuyoung.kim at webkit.org>'s request for review:
Bug 137738: Move TextCodec classes to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=137738
Attachment 239864: Patch
https://bugs.webkit.org/attachment.cgi?id=239864&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=239864&action=review
OK to do this, but please use make_unique, not unique_ptr/new.
> Source/WebCore/platform/text/TextCodecICU.cpp:72
> + return std::unique_ptr<TextCodec>(new TextCodecICU(encoding.name(),
static_cast<const char*>(additionalData)));
This should use std::make_unique, not new combined with std::unique_ptr.
> Source/WebCore/platform/text/TextCodecLatin1.cpp:109
> + return std::unique_ptr<TextCodec>(new TextCodecLatin1);
Ditto.
> Source/WebCore/platform/text/TextCodecUTF16.cpp:53
> + return std::unique_ptr<TextCodec>(new TextCodecUTF16(true));
Ditto.
> Source/WebCore/platform/text/TextCodecUTF16.cpp:58
> + return std::unique_ptr<TextCodec>(new TextCodecUTF16(false));
Ditto.
> Source/WebCore/platform/text/TextCodecUTF8.cpp:43
> + return std::unique_ptr<TextCodec>(new TextCodecUTF8);
Ditto.
> Source/WebCore/platform/text/TextCodecUserDefined.cpp:44
> + return std::unique_ptr<TextCodec>(new TextCodecUserDefined);
Ditto.
> Source/WebCore/platform/text/mac/TextCodecMac.cpp:71
> + return std::unique_ptr<TextCodec>(new TextCodecMac(*static_cast<const
TECTextEncodingID*>(additionalData)));
Ditto.
More information about the webkit-reviews
mailing list