summaryrefslogtreecommitdiff
path: root/core/fxcrt/css
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-20 20:32:04 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-20 20:32:04 +0000
commitc62e8489042c5efaa3b666846b38a52da3b91481 (patch)
treef0a1ef59f861bbd8e9ba81c6fb274f44d69450ea /core/fxcrt/css
parentb6b01cb2cbaf6b38736f4dfebb9b6cdc243960f9 (diff)
downloadpdfium-c62e8489042c5efaa3b666846b38a52da3b91481.tar.xz
Avoid more .c_str() usage, part 3
Change-Id: I5dfadcb68e640235be6e3eb7c8d57ae3b8013d26 Reviewed-on: https://pdfium-review.googlesource.com/35691 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/css')
-rw-r--r--core/fxcrt/css/cfx_cssrulecollection.cpp2
-rw-r--r--core/fxcrt/css/cfx_cssstyleselector.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/css/cfx_cssrulecollection.cpp b/core/fxcrt/css/cfx_cssrulecollection.cpp
index 2030518b69..f525821522 100644
--- a/core/fxcrt/css/cfx_cssrulecollection.cpp
+++ b/core/fxcrt/css/cfx_cssrulecollection.cpp
@@ -29,7 +29,7 @@ void CFX_CSSRuleCollection::Clear() {
const std::vector<std::unique_ptr<CFX_CSSRuleCollection::Data>>*
CFX_CSSRuleCollection::GetTagRuleData(const WideString& tagname) const {
- auto it = m_TagRules.find(FX_HashCode_GetW(tagname.c_str(), true));
+ auto it = m_TagRules.find(FX_HashCode_GetW(tagname.AsStringView(), true));
return it != m_TagRules.end() ? &it->second : nullptr;
}
diff --git a/core/fxcrt/css/cfx_cssstyleselector.cpp b/core/fxcrt/css/cfx_cssstyleselector.cpp
index 4a47798d31..9b1a2235bc 100644
--- a/core/fxcrt/css/cfx_cssstyleselector.cpp
+++ b/core/fxcrt/css/cfx_cssstyleselector.cpp
@@ -75,7 +75,7 @@ bool CFX_CSSStyleSelector::MatchSelector(const WideString& tagname,
pSel->GetType() == CFX_CSSSelectorType::Descendant) {
return false;
}
- return pSel->GetNameHash() == FX_HashCode_GetW(tagname.c_str(), true);
+ return pSel->GetNameHash() == FX_HashCode_GetW(tagname.AsStringView(), true);
}
void CFX_CSSStyleSelector::ComputeStyle(