aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/core
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-11-10 13:12:49 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-10 16:46:26 -0800
commit83c2da808e96dc5c9c3e80353d1db58a17502bf1 (patch)
tree185b741e08b55fbe8dfa07013a2fc5ef3c7797de /tensorflow/core/lib/core
parentf157cc92a895b0cd9f5f15cc459e60ab0c98c875 (diff)
Removed StringPiece::set and StringPiece::clear, as they have no absl::string_view equivalents.
This will allow for a more convenient transition to absl::string_view. Calls to set StringPiece::set and StringPiece::clear were replaced with the StringPiece constructor as follows: string_piece_foo.set(data, size) => string_piece_foo = StringPiece(data, size) string_piece_foo.clear() => string_piece_foo = StringPiece() PiperOrigin-RevId: 175326576
Diffstat (limited to 'tensorflow/core/lib/core')
-rw-r--r--tensorflow/core/lib/core/stringpiece.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/tensorflow/core/lib/core/stringpiece.h b/tensorflow/core/lib/core/stringpiece.h
index 7d258b36c5..94f4a377f1 100644
--- a/tensorflow/core/lib/core/stringpiece.h
+++ b/tensorflow/core/lib/core/stringpiece.h
@@ -51,11 +51,6 @@ class StringPiece {
// Create a slice that refers to s[0,strlen(s)-1]
StringPiece(const char* s) : data_(s), size_(strlen(s)) {}
- void set(const void* data, size_t len) {
- data_ = reinterpret_cast<const char*>(data);
- size_ = len;
- }
-
// Return a pointer to the beginning of the referenced data
const char* data() const { return data_; }
@@ -79,12 +74,6 @@ class StringPiece {
return data_[n];
}
- // Change this slice to refer to an empty array
- void clear() {
- data_ = "";
- size_ = 0;
- }
-
// Drop the first "n" bytes from this slice.
void remove_prefix(size_t n) {
assert(n <= size());