From a6adac83c6aadbacf2a338d2e55148f7d3417762 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 2 Nov 2017 19:27:08 +0000 Subject: Remove some C-style const char* casts. Change-Id: I4785dd277b9da072ee3c55e2aaeb688bbf02852e Reviewed-on: https://pdfium-review.googlesource.com/17391 Reviewed-by: dsinclair Commit-Queue: Lei Zhang --- fpdfsdk/fpdf_flatten.cpp | 3 +-- fpdfsdk/fpdfview.cpp | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp index a276e3a368..35d3617627 100644 --- a/fpdfsdk/fpdf_flatten.cpp +++ b/fpdfsdk/fpdf_flatten.cpp @@ -200,8 +200,7 @@ void SetPageContents(const ByteString& key, auto pAcc = pdfium::MakeRetain(pContentsStream); pAcc->LoadAllData(); ByteString sStream = "q\n"; - ByteString sBody = - ByteString((const char*)pAcc->GetData(), pAcc->GetSize()); + ByteString sBody = ByteString(pAcc->GetData(), pAcc->GetSize()); sStream = sStream + sBody + "\nQ"; pContentsStream->SetDataAndRemoveFilter(sStream.raw_str(), sStream.GetLength()); diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index dc2cfef126..2736b8dd6a 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -571,9 +571,8 @@ FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BYTESTRING password) { // NOTE: the creation of the file needs to be by the embedder on the // other side of this API. - return LoadDocumentImpl( - IFX_SeekableReadStream::CreateFromFilename((const char*)file_path), - password); + return LoadDocumentImpl(IFX_SeekableReadStream::CreateFromFilename(file_path), + password); } FPDF_EXPORT int FPDF_CALLCONV FPDF_GetFormType(FPDF_DOCUMENT document) { -- cgit v1.2.3