From c4a2b7518949df00651aa3513c93079f1968441e Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 7 Apr 2017 13:56:13 -0700 Subject: Cleanup string passing in core/fpdf* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return strings where possible. Add missing consts to strings passed by ref. Convert non-const cases to pointers. Rename a few methods to be clearer. Change-Id: I86569bc1744f539e6dd67fc73649b272c016328c Reviewed-on: https://pdfium-review.googlesource.com/3951 Commit-Queue: Tom Sepez Reviewed-by: Nicolás Peña --- core/fpdfdoc/cpdf_docjsactions.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/fpdfdoc/cpdf_docjsactions.cpp') diff --git a/core/fpdfdoc/cpdf_docjsactions.cpp b/core/fpdfdoc/cpdf_docjsactions.cpp index a7fcdfd071..c0e7a78fd6 100644 --- a/core/fpdfdoc/cpdf_docjsactions.cpp +++ b/core/fpdfdoc/cpdf_docjsactions.cpp @@ -16,11 +16,12 @@ int CPDF_DocJSActions::CountJSActions() const { return name_tree.GetCount(); } -CPDF_Action CPDF_DocJSActions::GetJSAction(int index, - CFX_ByteString& csName) const { +CPDF_Action CPDF_DocJSActions::GetJSActionAndName( + int index, + CFX_ByteString* csName) const { ASSERT(m_pDocument); CPDF_NameTree name_tree(m_pDocument, "JavaScript"); - CPDF_Object* pAction = name_tree.LookupValue(index, csName); + CPDF_Object* pAction = name_tree.LookupValueAndName(index, csName); return ToDictionary(pAction) ? CPDF_Action(pAction->GetDict()) : CPDF_Action(); } -- cgit v1.2.3