From c560a8c11a6f8ee239e570db8c022ae0fd2a4db5 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Thu, 4 Jan 2018 14:43:27 -0500 Subject: Convert usages of pdfium::Optional to Optional Change-Id: I29769f78eaad10c6a8b79e27524336c4f330377e Reviewed-on: https://pdfium-review.googlesource.com/22258 Reviewed-by: Tom Sepez Reviewed-by: dsinclair Commit-Queue: Ryan Harrison --- fpdfsdk/fpdfppo.cpp | 2 +- fpdfsdk/fpdftext.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp index 4df758a591..d88f9102b9 100644 --- a/fpdfsdk/fpdfppo.cpp +++ b/fpdfsdk/fpdfppo.cpp @@ -85,7 +85,7 @@ bool ParserPageRangeString(ByteString rangstring, ByteString cbMidRange; size_t nStringFrom = 0; - pdfium::Optional nStringTo = 0; + Optional nStringTo = 0; while (nStringTo < nLength) { nStringTo = rangstring.Find(',', nStringFrom); if (!nStringTo.has_value()) diff --git a/fpdfsdk/fpdftext.cpp b/fpdfsdk/fpdftext.cpp index d9f7d572e9..9392981df1 100644 --- a/fpdfsdk/fpdftext.cpp +++ b/fpdfsdk/fpdftext.cpp @@ -263,10 +263,9 @@ FPDFText_FindStart(FPDF_TEXTPAGE text_page, CPDF_TextPageFind* textpageFind = new CPDF_TextPageFind(CPDFTextPageFromFPDFTextPage(text_page)); size_t len = WideString::WStringLength(findwhat); - textpageFind->FindFirst(WideString::FromUTF16LE(findwhat, len), flags, - start_index >= 0 - ? pdfium::Optional(start_index) - : pdfium::Optional()); + textpageFind->FindFirst( + WideString::FromUTF16LE(findwhat, len), flags, + start_index >= 0 ? Optional(start_index) : Optional()); return textpageFind; } -- cgit v1.2.3