Skip to content

Commit 4f22226

Browse files
georgthegreatAdam Cozzette
authored andcommitted
Deduplicate StripProto methods
1 parent 2e28bfe commit 4f22226

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

src/google/protobuf/compiler/js/js_generator.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@ bool StrEndsWith(StringPiece sp, StringPiece x) {
9999
return sp.size() >= x.size() && sp.substr(sp.size() - x.size()) == x;
100100
}
101101

102-
// Returns a copy of |filename| with any trailing ".protodevel" or ".proto
103-
// suffix stripped.
104-
// TODO(haberman): Unify with copy in compiler/cpp/internal/helpers.cc.
105-
std::string StripProto(const std::string& filename) {
106-
const char* suffix =
107-
StrEndsWith(filename, ".protodevel") ? ".protodevel" : ".proto";
108-
return StripSuffixString(filename, suffix);
109-
}
110-
111102
std::string GetSnakeFilename(const std::string& filename) {
112103
std::string snake_name = filename;
113104
ReplaceCharacters(&snake_name, "/", '_');

0 commit comments

Comments
 (0)