diff options
author | tsepez <tsepez@chromium.org> | 2016-09-13 06:33:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-13 06:33:15 -0700 |
commit | bb8935e9def5ad865be613eebea597a77fc7c547 (patch) | |
tree | f78b7aa57a53d88543f3d8f2b8d843456c5b5df5 /core/fpdfdoc | |
parent | f786c267e290c259b38afe900b8abd23812a575b (diff) | |
download | pdfium-bb8935e9def5ad865be613eebea597a77fc7c547.tar.xz |
Get rid of memcmp in CFieldTree::Lookup()
Wide strings compare just fine on their own.
Review-Url: https://codereview.chromium.org/2331233002
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/cpdf_interform.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index d567e09e82..0ebf4460cf 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -634,11 +634,8 @@ CFieldTree::Node* CFieldTree::Lookup(Node* pParent, for (int i = 0; i < pParent->children.GetSize(); i++) { Node* pNode = pParent->children[i]; - if (pNode->short_name.GetLength() == short_name.GetLength() && - FXSYS_memcmp(pNode->short_name.c_str(), short_name.c_str(), - short_name.GetLength() * sizeof(FX_WCHAR)) == 0) { + if (pNode->short_name == short_name) return pNode; - } } return nullptr; } |