summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_resolveprocessor.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-11-21 18:07:00 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-21 18:07:00 +0000
commit135c6601bd9d12bd935371d3122f8e75391de75b (patch)
tree185227ece2aa6cceb58911d2b25871dab4860251 /fxjs/cfxjse_resolveprocessor.cpp
parentf276e78e190e04b25c3f05b35a28ecdd30bdcf21 (diff)
downloadpdfium-135c6601bd9d12bd935371d3122f8e75391de75b.tar.xz
Add {Byte/Wide}String::Trim().
So callers no longer have to call str.TrimLeft(); str.TrimRight(); Change-Id: If931eaa8d891f487b9618ebbeee5ee294e807846 Reviewed-on: https://pdfium-review.googlesource.com/18990 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_resolveprocessor.cpp')
-rw-r--r--fxjs/cfxjse_resolveprocessor.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/fxjs/cfxjse_resolveprocessor.cpp b/fxjs/cfxjse_resolveprocessor.cpp
index 7802957c7c..ef7ddc10fb 100644
--- a/fxjs/cfxjse_resolveprocessor.cpp
+++ b/fxjs/cfxjse_resolveprocessor.cpp
@@ -582,11 +582,9 @@ int32_t CFXJSE_ResolveProcessor::GetFilter(const WideStringView& wsExpression,
return -1;
wsName.ReleaseBuffer(nNameCount);
- wsName.TrimLeft();
- wsName.TrimRight();
+ wsName.Trim();
wsCondition.ReleaseBuffer(nConditionCount);
- wsCondition.TrimLeft();
- wsCondition.TrimRight();
+ wsCondition.Trim();
rnd.m_uHashName =
static_cast<XFA_HashCode>(FX_HashCode_GetW(wsName.AsStringView(), false));
return nStart;
@@ -700,8 +698,7 @@ void CFXJSE_ResolveProcessor::FilterCondition(CFXJSE_ResolveNodeData& rnd,
}
}
int32_t iFoundCount = pdfium::CollectionSize<int32_t>(rnd.m_Objects);
- wsCondition.TrimLeft();
- wsCondition.TrimRight();
+ wsCondition.Trim();
int32_t iLen = wsCondition.GetLength();
if (!iLen) {
if (rnd.m_dwStyles & XFA_RESOLVENODE_ALL) {