commit | 3d704888eb6f5c72edd3abe6e5e48a62ef218975 | [log] [tgz] |
---|---|---|
author | tsepez <tsepez@chromium.org> | Tue Sep 13 18:10:22 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Tue Sep 13 18:10:23 2016 -0700 |
tree | cb7771f57efd960274d266c6166abb2fc60a775c | |
parent | b31ca718ee94b681b9a1c3e59dcd885a4f421a5f [diff] [blame] |
Add check for trivial string equality BUG= Review-Url: https://codereview.chromium.org/2338623005
diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp index 8837c6b..88fc588 100644 --- a/core/fxcrt/fx_basic_wstring.cpp +++ b/core/fxcrt/fx_basic_wstring.cpp
@@ -180,6 +180,9 @@ } bool CFX_WideString::operator==(const CFX_WideString& other) const { + if (m_pData == other.m_pData) + return true; + if (IsEmpty()) return other.IsEmpty();