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/include/cpdf_object.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/fpdfapi/fpdf_parser/include/cpdf_object.h') diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_object.h b/core/fpdfapi/fpdf_parser/include/cpdf_object.h index 802cbbc638..6cdaaf58fd 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_object.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_object.h @@ -46,6 +46,8 @@ class CPDF_Object { void Release(); virtual CFX_ByteString GetString() const; + + // Note: |this| must outlive the use of |GetConstString|'s result. virtual CFX_ByteStringC GetConstString() const; virtual CFX_WideString GetUnicodeText() const; virtual FX_FLOAT GetNumber() const; -- cgit v1.2.3