From 9851c703ae371236e4d4b4dbe537d3de8760931e Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Tue, 11 Dec 2018 16:43:05 -0800 Subject: [PATCH] Rename StringPieceTrimWhitespace() for rewriting purposes. --- .../protobuf/compiler/objectivec/objectivec_helpers.cc | 6 +++--- .../protobuf/compiler/objectivec/objectivec_helpers.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc index c25b0c9de9..ef81f5776f 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc @@ -364,7 +364,7 @@ string StripProto(const string& filename) { } } -void StringPieceTrimWhitespace(StringPiece* input) { +void TrimWhitespace(StringPiece* input) { while (!input->empty() && ascii_isspace(*input->data())) { input->remove_prefix(1); } @@ -1054,8 +1054,8 @@ bool ExpectedPrefixesCollector::ConsumeLine( } StringPiece package(line, 0, offset); StringPiece prefix(line, offset + 1, line.length() - offset - 1); - StringPieceTrimWhitespace(&package); - StringPieceTrimWhitespace(&prefix); + TrimWhitespace(&package); + TrimWhitespace(&prefix); // Don't really worry about error checking the package/prefix for // being valid. Assume the file is validated when it is created/edited. (*prefix_map_)[package.ToString()] = prefix.ToString(); diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h index e2f70245d9..98ec7db8fb 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h @@ -62,7 +62,7 @@ string PROTOC_EXPORT EscapeTrigraphs(const string& to_escape); string PROTOC_EXPORT StripProto(const string& filename); // Remove white space from either end of a StringPiece. -void PROTOC_EXPORT StringPieceTrimWhitespace(StringPiece* input); +void PROTOC_EXPORT TrimWhitespace(StringPiece* input); // Returns true if the name requires a ns_returns_not_retained attribute applied // to it.