From 28f97ff783c16f3391384ce97b765ce4eb310ac7 Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 4 Apr 2016 16:41:35 -0700 Subject: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. Having this happen implicitly can be dangerous because the lifetime has to be considered; we should have caught the "red bots" in https://codereview.chromium.org/1847333004/#ps60001 at compile time. Review URL: https://codereview.chromium.org/1853233002 --- core/fpdfdoc/doc_bookmark.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfdoc/doc_bookmark.cpp') diff --git a/core/fpdfdoc/doc_bookmark.cpp b/core/fpdfdoc/doc_bookmark.cpp index 22ff7921ef..35a04043fe 100644 --- a/core/fpdfdoc/doc_bookmark.cpp +++ b/core/fpdfdoc/doc_bookmark.cpp @@ -80,8 +80,8 @@ CPDF_Dest CPDF_Bookmark::GetDest(CPDF_Document* pDocument) const { return CPDF_Dest(); if (pDest->IsString() || pDest->IsName()) { CPDF_NameTree name_tree(pDocument, "Dests"); - CFX_ByteStringC name = pDest->GetString(); - return CPDF_Dest(name_tree.LookupNamedDest(pDocument, name)); + return CPDF_Dest(name_tree.LookupNamedDest( + pDocument, pDest->GetString().AsByteStringC())); } if (CPDF_Array* pArray = pDest->AsArray()) return CPDF_Dest(pArray); -- cgit v1.2.3