diff options
author | 2017-11-13 15:00:07 -0800 | |
---|---|---|
committer | 2017-11-13 15:04:33 -0800 | |
commit | 7d197b3ab4b5389c19ab7742cf5d473d5fa91b08 (patch) | |
tree | 640dafb9ef9e9250a61b9921b51c603b1241aa85 /tensorflow/core/lib/core | |
parent | 061c3597b84d45a9878b8adf831e39a5573859ec (diff) |
Automated g4 rollback of changelist 175563786
PiperOrigin-RevId: 175593063
Diffstat (limited to 'tensorflow/core/lib/core')
-rw-r--r-- | tensorflow/core/lib/core/stringpiece.cc | 2 | ||||
-rw-r--r-- | tensorflow/core/lib/core/stringpiece.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/core/lib/core/stringpiece.cc b/tensorflow/core/lib/core/stringpiece.cc index 29b727fc44..984f4404ce 100644 --- a/tensorflow/core/lib/core/stringpiece.cc +++ b/tensorflow/core/lib/core/stringpiece.cc @@ -21,7 +21,7 @@ limitations under the License. namespace tensorflow { -size_t StringPieceHasher::operator()(StringPiece s) const { +size_t StringPiece::Hasher::operator()(StringPiece s) const { return Hash64(s.data(), s.size()); } diff --git a/tensorflow/core/lib/core/stringpiece.h b/tensorflow/core/lib/core/stringpiece.h index 53af116465..94f4a377f1 100644 --- a/tensorflow/core/lib/core/stringpiece.h +++ b/tensorflow/core/lib/core/stringpiece.h @@ -103,6 +103,10 @@ class StringPiece { StringPiece substr(size_t pos, size_t n = npos) const; + struct Hasher { + size_t operator()(StringPiece arg) const; + }; + // Return a string that contains the copy of the referenced data. std::string ToString() const { return std::string(data_, size_); } @@ -129,10 +133,6 @@ class StringPiece { // Intentionally copyable }; -struct StringPieceHasher { - size_t operator()(StringPiece s) const; -}; - inline bool operator==(StringPiece x, StringPiece y) { return ((x.size() == y.size()) && (memcmp(x.data(), y.data(), x.size()) == 0)); |