From 4d31d0c653cf66f72bdef7cebbf7cff45d33f6c6 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 19 Apr 2016 14:11:59 -0700 Subject: Remove a few more char* members from structs/classes. This is a result of looking for the anti-paterns /char\*\sm_/ and /m_.*=.*\.c_str/ which indicate that a class may be using the contents of a string without extending the lifetime of the underlying storage. Along the way, change to uint8_t in fx_dib; this is unrelated but avoids grep hits (it is binary, not chars anyways). Also remove two string operators that make it easy to assign in a manner that does not extend contents lifetime. Review URL: https://codereview.chromium.org/1902953002 --- xfa/fxfa/parser/xfa_document_imp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xfa/fxfa/parser/xfa_document_imp.cpp') diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp index bdcfba47cb..39bdf2503c 100644 --- a/xfa/fxfa/parser/xfa_document_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_imp.cpp @@ -388,7 +388,7 @@ void CXFA_Document::DoProtoMerge() { !wsUseVal.IsEmpty()) { FX_STRSIZE uSharpPos = wsUseVal.Find('#'); if (uSharpPos < 0) { - wsURI = wsUseVal; + wsURI = wsUseVal.AsStringC(); } else { wsURI = CFX_WideStringC(wsUseVal.c_str(), uSharpPos); FX_STRSIZE uLen = wsUseVal.GetLength(); -- cgit v1.2.3