Remove unused variable

pull/8224/head^2
deannagarcia 4 years ago committed by GitHub
parent f1fba4c227
commit 868b712916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/google/protobuf/compiler/java/java_helpers.cc

@ -90,17 +90,6 @@ const std::unordered_set<std::string>* kReservedNames =
"transient", "try", "void", "volatile", "while", "transient", "try", "void", "volatile", "while",
}); });
// Names that should be avoided as field names in Kotlin.
// All Kotlin hard keywords are in this list.
const std::unordered_set<std::string>* kKotlinForbiddenNames =
new std::unordered_set<std::string>({
"as", "as?", "break", "class", "continue", "do", "else",
"false", "for", "fun", "if", "in", "!in", "interface",
"is", "!is", "null", "object", "package", "return", "super",
"this", "throw", "true", "try", "typealias", "typeof", "val",
"var", "when", "while",
});
bool IsForbidden(const std::string& field_name) { bool IsForbidden(const std::string& field_name) {
for (int i = 0; i < GOOGLE_ARRAYSIZE(kForbiddenWordList); ++i) { for (int i = 0; i < GOOGLE_ARRAYSIZE(kForbiddenWordList); ++i) {
if (field_name == kForbiddenWordList[i]) { if (field_name == kForbiddenWordList[i]) {

Loading…
Cancel
Save