Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Jan 5, 2017
1 parent 8ad7f08 commit 08317a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/args.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void each_arg(F f, Ts&&... xs)
(void)std::initializer_list<int>{((void)f(std::forward<Ts>(xs)), 0)...};
}

std::vector<std::string> wrap(const std::string& text, int line_length = 72)
std::vector<std::string> wrap(const std::string& text, unsigned int line_length = 72)
{
std::vector<std::string> output;
std::istringstream iss(text);
Expand Down
10 changes: 5 additions & 5 deletions test/callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ struct callback_cmd
template<class F>
void parse(F f)
{
auto cb = [this](auto& count, const auto&, const args::argument& arg) {
if (arg.count > 0) for(int i=0;i<count;i++) final_name += name;
auto cb = [this](auto& c, const auto&, const args::argument& arg) {
if (arg.count > 0) for(int i=0;i<c;i++) final_name += name;
};
f(count, "--count", "-C", args::callback(cb));
f(name, "--name", "-N");
Expand Down Expand Up @@ -48,8 +48,8 @@ struct eager_callback_cmd
template<class F>
void parse(F f)
{
auto cb = [this](auto& count, const auto&, const args::argument&) {
final_out = std::to_string(count);
auto cb = [this](auto& c, const auto&, const args::argument&) {
final_out = std::to_string(c);
};
f(count, "--count", "-C", args::eager_callback(cb));
f(name, "--name", "-N");
Expand Down Expand Up @@ -123,4 +123,4 @@ PROVE_CASE()
PROVE_CHECK(cmd.count == 0);
PROVE_CHECK(cmd.name == "");
PROVE_CHECK(cmd.final_out == "hello");
}
}

0 comments on commit 08317a0

Please sign in to comment.