From e08d2b1fee0db40bac9538ca8b7be0a951675bd6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 25 Apr 2018 18:49:32 +0000 Subject: Introduce ScopedFPDF types in public/cpp/fpdf_scopers.h Applies std::remove_ptr to the public API types so that we can deduce a correct unique ptr type no matter how that API might change away from void* usage. Creates shorter names for std::unique_ptr, ...> Change-Id: I04a0ff43cb7d5a4d3867939a53a54c9cef00db86 Reviewed-on: https://pdfium-review.googlesource.com/31292 Reviewed-by: Lei Zhang Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- core/fxge/fx_ge_text_embeddertest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/fxge') diff --git a/core/fxge/fx_ge_text_embeddertest.cpp b/core/fxge/fx_ge_text_embeddertest.cpp index 362ccf5dc1..e47ed5f7c6 100644 --- a/core/fxge/fx_ge_text_embeddertest.cpp +++ b/core/fxge/fx_ge_text_embeddertest.cpp @@ -4,6 +4,7 @@ #include +#include "public/cpp/fpdf_scopers.h" #include "testing/embedder_test.h" #include "testing/gtest/include/gtest/gtest.h" @@ -14,7 +15,7 @@ TEST_F(FXGETextEmbedderTest, BadItalic) { EXPECT_TRUE(OpenDocument("bug_601362.pdf")); FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page); - std::unique_ptr bitmap = RenderLoadedPage(page); + ScopedFPDFBitmap bitmap = RenderLoadedPage(page); EXPECT_EQ(612, FPDFBitmap_GetWidth(bitmap.get())); EXPECT_EQ(792, FPDFBitmap_GetHeight(bitmap.get())); UnloadPage(page); -- cgit v1.2.3