simplewallet: remove unnecessary local_args.erase(...) in set_variable()

This commit is contained in:
kenshi84 2016-12-26 08:50:37 +09:00
parent dd580d7bc7
commit 542571f5cb

View file

@ -611,9 +611,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
} }
else if (args[1] == "language") else if (args[1] == "language")
{ {
std::vector<std::string> local_args = args; seed_set_language(args);
local_args.erase(local_args.begin(), local_args.begin()+2);
seed_set_language(local_args);
return true; return true;
} }
} }
@ -626,9 +624,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
} }
else else
{ {
std::vector<std::string> local_args = args; set_always_confirm_transfers(args);
local_args.erase(local_args.begin(), local_args.begin()+2);
set_always_confirm_transfers(local_args);
return true; return true;
} }
} }
@ -641,9 +637,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
} }
else else
{ {
std::vector<std::string> local_args = args; set_store_tx_info(args);
local_args.erase(local_args.begin(), local_args.begin()+2);
set_store_tx_info(local_args);
return true; return true;
} }
} }
@ -656,9 +650,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
} }
else else
{ {
std::vector<std::string> local_args = args; set_default_mixin(args);
local_args.erase(local_args.begin(), local_args.begin()+2);
set_default_mixin(local_args);
return true; return true;
} }
} }
@ -671,9 +663,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
} }
else else
{ {
std::vector<std::string> local_args = args; set_auto_refresh(args);
local_args.erase(local_args.begin(), local_args.begin()+2);
set_auto_refresh(local_args);
return true; return true;
} }
} }
@ -687,9 +677,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
} }
else else
{ {
std::vector<std::string> local_args = args; set_refresh_type(args);
local_args.erase(local_args.begin(), local_args.begin()+2);
set_refresh_type(local_args);
return true; return true;
} }
} }
@ -702,9 +690,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
} }
else else
{ {
std::vector<std::string> local_args = args; set_default_priority(args);
local_args.erase(local_args.begin(), local_args.begin()+2);
set_default_priority(local_args);
return true; return true;
} }
} }
@ -717,9 +703,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
} }
else else
{ {
std::vector<std::string> local_args = args; set_confirm_missing_payment_id(args);
local_args.erase(local_args.begin(), local_args.begin()+2);
set_confirm_missing_payment_id(local_args);
return true; return true;
} }
} }