Rename StringPieceTrimWhitespace() for rewriting purposes.

pull/5469/head
Josh Haberman 6 years ago
parent 52fee0e8f0
commit 9851c703ae
  1. 6
      src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
  2. 2
      src/google/protobuf/compiler/objectivec/objectivec_helpers.h

@ -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();

@ -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.

Loading…
Cancel
Save