diff options
| author | Shinichiro Hamaji <hamaji@google.com> | 2016-02-28 04:40:46 +0000 |
|---|---|---|
| committer | Shinichiro Hamaji <hamaji@google.com> | 2016-02-28 04:40:46 +0000 |
| commit | 086b17663573f0d2742c534885a787c6d98216b9 (patch) | |
| tree | 5618f6c181f4685b721fb141b59dfbbd691ce12b /string_piece.cc | |
| parent | 59ce30d7b247cfc41950e2cc5438a1bff66bdc1f (diff) | |
Revert "Merge remote-tracking branch 'aosp/upstream'"
This reverts commit 59ce30d7b247cfc41950e2cc5438a1bff66bdc1f.
This looks the culprit of b/27381403. As I haven't figured out
the cause yet, let's just revert this for now.
Bug: 27381403
Change-Id: Ifd25a24b4bd7f2922ce76d6a05f85723074848ea
Diffstat (limited to 'string_piece.cc')
| -rw-r--r-- | string_piece.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/string_piece.cc b/string_piece.cc index d287616..78de4ed 100644 --- a/string_piece.cc +++ b/string_piece.cc @@ -21,7 +21,6 @@ #include <ctype.h> #include <limits.h> -#include <stdint.h> #include <algorithm> #include <ostream> @@ -33,15 +32,8 @@ typedef StringPiece::size_type size_type; bool operator==(const StringPiece& x, const StringPiece& y) { if (x.size() != y.size()) return false; - size_t len = x.size(); - if (len >= sizeof(uint64_t)) { - len -= sizeof(uint64_t); - uint64_t xt = *reinterpret_cast<const uint64_t*>(x.data() + len); - uint64_t yt = *reinterpret_cast<const uint64_t*>(y.data() + len); - if (xt != yt) - return false; - } - return StringPiece::wordmemcmp(x.data(), y.data(), len) == 0; + + return StringPiece::wordmemcmp(x.data(), y.data(), x.size()) == 0; } void StringPiece::CopyToString(std::string* target) const { |
