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

Unified Diff: core/fpdfdoc/cpdf_interform.cpp

Issue 2331233002: Get rid of memcmp in CFieldTree::Lookup() (Closed)
Patch Set: Created 4 years, 3 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpdf_interform.cpp
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
index d567e09e82f96f68467a0ad6216ebfb4f6ee141f..0ebf4460cfdd3e0d9d2e47dbceebcdbb422f1d72 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698