summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfedit_embeddertest.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-17 17:23:22 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-17 21:40:41 +0000
commit46abb66cb57d4bc6b9326efd7a0c0e776e594db2 (patch)
treed0e3b8bada3ff24ac3cff44f4ae0ed990232448d /fpdfsdk/fpdfedit_embeddertest.cpp
parent26853181af1b28ba8070b955d90fb7a17fec2713 (diff)
downloadpdfium-46abb66cb57d4bc6b9326efd7a0c0e776e594db2.tar.xz
Use more static_cast in fpdfsdk
This CL replaces some reinterpret_cast with static_cast in fpdfsdk. It also removes an obsolete comment in fpdfedit.h Change-Id: I36c29bfcd6382490a8c955b50ccfa4c93ab351c7 Reviewed-on: https://pdfium-review.googlesource.com/5632 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfedit_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfedit_embeddertest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
index ed5fe3e7f8..4559ee3f19 100644
--- a/fpdfsdk/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/fpdfedit_embeddertest.cpp
@@ -26,7 +26,7 @@ class FPDFEditEmbeddertest : public EmbedderTest, public TestSaver {
protected:
FPDF_DOCUMENT CreateNewDocument() {
document_ = FPDF_CreateNewDocument();
- cpdf_doc_ = reinterpret_cast<CPDF_Document*>(document_);
+ cpdf_doc_ = static_cast<CPDF_Document*>(document_);
return document_;
}
@@ -562,7 +562,7 @@ TEST_F(FPDFEditEmbeddertest, LoadSimpleType1Font) {
std::unique_ptr<void, FPDFFontDeleter> font(
FPDFText_LoadFont(document(), data, size, FPDF_FONT_TYPE1, false));
ASSERT_TRUE(font.get());
- CPDF_Font* typed_font = reinterpret_cast<CPDF_Font*>(font.get());
+ CPDF_Font* typed_font = static_cast<CPDF_Font*>(font.get());
EXPECT_TRUE(typed_font->IsType1Font());
CPDF_Dictionary* font_dict = typed_font->GetFontDict();
@@ -591,7 +591,7 @@ TEST_F(FPDFEditEmbeddertest, LoadSimpleTrueTypeFont) {
std::unique_ptr<void, FPDFFontDeleter> font(
FPDFText_LoadFont(document(), data, size, FPDF_FONT_TRUETYPE, false));
ASSERT_TRUE(font.get());
- CPDF_Font* typed_font = reinterpret_cast<CPDF_Font*>(font.get());
+ CPDF_Font* typed_font = static_cast<CPDF_Font*>(font.get());
EXPECT_TRUE(typed_font->IsTrueTypeFont());
CPDF_Dictionary* font_dict = typed_font->GetFontDict();
@@ -621,7 +621,7 @@ TEST_F(FPDFEditEmbeddertest, LoadCIDType0Font) {
std::unique_ptr<void, FPDFFontDeleter> font(
FPDFText_LoadFont(document(), data, size, FPDF_FONT_TYPE1, 1));
ASSERT_TRUE(font.get());
- CPDF_Font* typed_font = reinterpret_cast<CPDF_Font*>(font.get());
+ CPDF_Font* typed_font = static_cast<CPDF_Font*>(font.get());
EXPECT_TRUE(typed_font->IsCIDFont());
// Check font dictionary entries
@@ -663,7 +663,7 @@ TEST_F(FPDFEditEmbeddertest, LoadCIDType2Font) {
std::unique_ptr<void, FPDFFontDeleter> font(
FPDFText_LoadFont(document(), data, size, FPDF_FONT_TRUETYPE, 1));
ASSERT_TRUE(font.get());
- CPDF_Font* typed_font = reinterpret_cast<CPDF_Font*>(font.get());
+ CPDF_Font* typed_font = static_cast<CPDF_Font*>(font.get());
EXPECT_TRUE(typed_font->IsCIDFont());
// Check font dictionary entries