Skip to content

Commit

Permalink
Fix cpp warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley-cheung committed Aug 29, 2018
1 parent 4bf05b7 commit 9877e80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions javascript/net/grpc/web/grpc_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ char ToLowerASCII(char c) {
std::vector<string> ParseLowerUnderscore(const string& input) {
std::vector<string> words;
string running = "";
for (int i = 0; i < input.size(); i++) {
for (size_t i = 0; i < input.size(); i++) {
if (input[i] == '_') {
if (!running.empty()) {
words.push_back(running);
Expand All @@ -185,7 +185,7 @@ std::vector<string> ParseLowerUnderscore(const string& input) {

string ToUpperCamel(const std::vector<string>& words) {
string result;
for (int i = 0; i < words.size(); i++) {
for (size_t i = 0; i < words.size(); i++) {
string word = words[i];
if (word[0] >= 'a' && word[0] <= 'z') {
word[0] = (word[0] - 'a') + 'A';
Expand Down Expand Up @@ -503,7 +503,7 @@ void PrintProtoDtsFile(Printer* printer, const FileDescriptor* file) {
printer->Print(vars, "export class $class_name$ {\n");
printer->Indent();
printer->Print("constructor ();\n");
for (size_t i = 0; i < it->second->field_count(); i++) {
for (int i = 0; i < it->second->field_count(); i++) {
vars["js_field_name"] =
ToUpperCamel(ParseLowerUnderscore(it->second->field(i)->name()));
string js_field_type = "";
Expand Down

0 comments on commit 9877e80

Please sign in to comment.