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/fpdfapi/fpdf_parser/cpdf_name.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfapi/fpdf_parser/cpdf_name.cpp') diff --git a/core/fpdfapi/fpdf_parser/cpdf_name.cpp b/core/fpdfapi/fpdf_parser/cpdf_name.cpp index db37754b66..a7adf1b3d6 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_name.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_name.cpp @@ -29,7 +29,7 @@ CFX_ByteString CPDF_Name::GetString() const { } CFX_ByteStringC CPDF_Name::GetConstString() const { - return CFX_ByteStringC(m_Name); + return m_Name.AsByteStringC(); } void CPDF_Name::SetString(const CFX_ByteString& str) { -- cgit v1.2.3