diff options
author | halcanary <halcanary@google.com> | 2016-09-02 11:29:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-02 11:29:46 -0700 |
commit | 022c2bd37a3d5b1611928b67e0be1c30a1a0946f (patch) | |
tree | 7b7d317361d1a0c10633575081c662b2a79502d8 /tests | |
parent | 233eb0adc7df47ac38eac20231f4b04e90cb0d8d (diff) |
SkMakeUnique.h defines skstd::make_unique<T>(Args...)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2293963002
Review-Url: https://codereview.chromium.org/2293963002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PDFPrimitivesTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index 1faecb516a..1001b99c47 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -12,6 +12,7 @@ #include "SkDocument.h" #include "SkDeflate.h" #include "SkImageEncoder.h" +#include "SkMakeUnique.h" #include "SkMatrix.h" #include "SkPDFCanon.h" #include "SkPDFDevice.h" @@ -75,8 +76,8 @@ static void assert_emit_eq(skiatest::Reporter* reporter, static void TestPDFStream(skiatest::Reporter* reporter) { char streamBytes[] = "Test\nFoo\tBar"; - std::unique_ptr<SkStreamAsset> streamData(new SkMemoryStream( - streamBytes, strlen(streamBytes), true)); + auto streamData = skstd::make_unique<SkMemoryStream>( + streamBytes, strlen(streamBytes), true); auto stream = sk_make_sp<SkPDFStream>(std::move(streamData)); assert_emit_eq(reporter, *stream, |