Merge pull request #1503

542571f5 simplewallet: remove unnecessary local_args.erase(...) in set_variable() (kenshi84)
This commit is contained in:
Riccardo Spagni 2017-01-08 16:38:01 -08:00
commit c284b0fff7
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -614,9 +614,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;
} }
} }
@ -629,9 +627,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;
} }
} }
@ -644,9 +640,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;
} }
} }
@ -659,9 +653,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;
} }
} }
@ -674,9 +666,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;
} }
} }
@ -690,9 +680,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;
} }
} }
@ -705,9 +693,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;
} }
} }
@ -720,9 +706,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;
} }
} }