diff options
author | Thomas Winget <tewinget@gmail.com> | 2014-06-08 18:12:38 -0400 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2014-06-12 19:05:52 -0400 |
commit | ce352392d53fd2679ba2671349543528207a923e (patch) | |
tree | d2be5eb7591007bb9bb1b768304b66dbfe22e5bf /src/simplewallet/simplewallet.cpp | |
parent | stupid signed arithmetic. (diff) | |
download | monero-ce352392d53fd2679ba2671349543528207a923e.tar.xz |
DRY cin input_line (and test replacement of non-DRY usage)
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 55099199d..24ecb4504 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -212,12 +212,10 @@ bool simple_wallet::ask_wallet_create_if_needed() { std::string wallet_path; - std::cout << "Specify wallet file name (e.g., wallet.bin). If the wallet doesn't exist, it will be created.\n"; - std::cout << "Wallet file name: "; - - std::getline(std::cin, wallet_path); - - wallet_path = string_tools::trim(wallet_path); + wallet_path = command_line::input_line( + "Specify wallet file name (e.g., wallet.bin). If the wallet doesn't exist, it will be created.\n" + "Wallet file name: " + ); bool keys_file_exists; bool wallet_file_exists; |