Skip to content

Commit

Permalink
Fixing return unreachable warning on NVCC
Browse files Browse the repository at this point in the history
Using `else` to make this explicit instead of a lone return.
  • Loading branch information
henryiii authored Jul 9, 2018
1 parent 60c662b commit 5f4121e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -1476,17 +1476,17 @@ void arg_map<Context>::init(const basic_format_args<Context> &args) {
break; // Do nothing.
}
}
return;
}
for (unsigned i = 0; ; ++i) {
switch (args.args_[i].type_) {
case internal::none_type:
return;
case internal::named_arg_type:
push_back(args.args_[i].value_);
break;
default:
break; // Do nothing.
} else {
for (unsigned i = 0;/*nothing*/; ++i) {
switch (args.args_[i].type_) {
case internal::none_type:
return;
case internal::named_arg_type:
push_back(args.args_[i].value_);
break;
default:
break; // Do nothing.
}
}
}
}
Expand Down

0 comments on commit 5f4121e

Please sign in to comment.