summaryrefslogtreecommitdiff
path: root/xfa/fde/css/cfde_cssselector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde/css/cfde_cssselector.cpp')
-rw-r--r--xfa/fde/css/cfde_cssselector.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fde/css/cfde_cssselector.cpp b/xfa/fde/css/cfde_cssselector.cpp
index 6d181ac325..03580236f5 100644
--- a/xfa/fde/css/cfde_cssselector.cpp
+++ b/xfa/fde/css/cfde_cssselector.cpp
@@ -53,13 +53,14 @@ CFDE_CSSSelector* CFDE_CSSSelector::GetNextSelector() const {
return m_pNext.get();
}
+// static.
std::unique_ptr<CFDE_CSSSelector> CFDE_CSSSelector::FromString(
- const FX_WCHAR* psz,
- int32_t iLen) {
- ASSERT(psz && iLen > 0);
+ const CFX_WideStringC& str) {
+ ASSERT(!str.IsEmpty());
+ const FX_WCHAR* psz = str.c_str();
const FX_WCHAR* pStart = psz;
- const FX_WCHAR* pEnd = psz + iLen;
+ const FX_WCHAR* pEnd = psz + str.GetLength();
for (; psz < pEnd; ++psz) {
switch (*psz) {
case '>':