Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: core/src/fxcrt/fx_xml_parser.cpp

Issue 733693003: Getting rid of more (FX_LPCWSTR) casts and fixing two bugs revealed by this. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebasing to latest origin/master. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcrt/fx_extension.cpp ('k') | core/src/fxcrt/fxcrt_platforms.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fx_xml_parser.cpp
diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp
index 3608a74a93365ba814e619bc64e09583feededf4..4a0b9a1d4ff894624d71a6bb3e71d257ec83ea40 100644
--- a/core/src/fxcrt/fx_xml_parser.cpp
+++ b/core/src/fxcrt/fx_xml_parser.cpp
@@ -672,7 +672,7 @@ FX_BOOL CXML_Element::GetAttrValue(FX_BSTR name, CFX_WideString& attribute) cons
FX_XML_SplitQualifiedName(name, bsSpace, bsName);
const CFX_WideString* pValue = m_AttrMap.Lookup(bsSpace, bsName);
Tom Sepez 2014/11/17 18:43:15 nit: some reason this doesn't just call into the m
brucedawson 2014/11/17 18:52:02 Could do that, if there aren't any additional risk
if (pValue) {
- attribute = CFX_WideString((FX_LPCWSTR)pValue, pValue->GetLength());
+ attribute = CFX_WideString(pValue->c_str(), pValue->GetLength());
return TRUE;
}
return FALSE;
@@ -681,7 +681,7 @@ FX_BOOL CXML_Element::GetAttrValue(FX_BSTR space, FX_BSTR name, CFX_WideString&
{
const CFX_WideString* pValue = m_AttrMap.Lookup(space, name);
if (pValue) {
- attribute = CFX_WideString((FX_LPCWSTR)pValue, pValue->GetLength());
+ attribute = CFX_WideString(pValue->c_str(), pValue->GetLength());
return TRUE;
}
return FALSE;
« no previous file with comments | « core/src/fxcrt/fx_extension.cpp ('k') | core/src/fxcrt/fxcrt_platforms.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698