aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/strings/scanner.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-04-04 12:08:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-04 12:11:49 -0700
commit13e103b8f0dcc89673dd0d3d589b976c05c37a09 (patch)
tree3debee5abeae72842052b360124504c5a62e9779 /tensorflow/core/lib/strings/scanner.h
parentbd540c8c45bf66a9c14af38a272840b47731b91a (diff)
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents. This will allow the deprecated methods to be removed. PiperOrigin-RevId: 191627087
Diffstat (limited to 'tensorflow/core/lib/strings/scanner.h')
-rw-r--r--tensorflow/core/lib/strings/scanner.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/core/lib/strings/scanner.h b/tensorflow/core/lib/strings/scanner.h
index d3b63357ee..c82e771368 100644
--- a/tensorflow/core/lib/strings/scanner.h
+++ b/tensorflow/core/lib/strings/scanner.h
@@ -18,6 +18,7 @@ limitations under the License.
#include <string>
#include "tensorflow/core/lib/core/stringpiece.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/macros.h"
namespace tensorflow {
@@ -75,14 +76,14 @@ class Scanner {
// Consume the next s.size() characters of the input, if they match <s>. If
// they don't match <s>, this is a no-op.
Scanner& ZeroOrOneLiteral(StringPiece s) {
- cur_.Consume(s);
+ str_util::ConsumePrefix(&cur_, s);
return *this;
}
// Consume the next s.size() characters of the input, if they match <s>. If
// they don't match <s>, then GetResult will ultimately return false.
Scanner& OneLiteral(StringPiece s) {
- if (!cur_.Consume(s)) {
+ if (!str_util::ConsumePrefix(&cur_, s)) {
error_ = true;
}
return *this;