Code Cleanup

- Removed unused util.cpp confirm3 function.
This commit is contained in:
Paul Beckingham 2014-09-07 16:46:20 -04:00
parent d9d5d004e6
commit be104ee7c4
3 changed files with 0 additions and 40 deletions

View file

@ -93,44 +93,6 @@ bool confirm (const std::string& question)
return matches[0] == STRING_UTIL_CONFIRM_YES ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
// 0 = no
// 1 = yes
// 2 = all
int confirm3 (const std::string& question)
{
std::vector <std::string> options;
options.push_back (STRING_UTIL_CONFIRM_YES_U);
options.push_back (STRING_UTIL_CONFIRM_YES);
options.push_back (STRING_UTIL_CONFIRM_NO);
options.push_back (STRING_UTIL_CONFIRM_ALL_U);
options.push_back (STRING_UTIL_CONFIRM_ALL);
std::string answer;
std::vector <std::string> matches;
do
{
std::cout << question
<< " ("
<< options[1] << "/"
<< options[2] << "/"
<< options[4]
<< ") ";
std::getline (std::cin, answer);
answer = trim (answer);
autoComplete (answer, options, matches, 1); // Hard-coded 1.
}
while (matches.size () != 1);
if (matches[0] == STRING_UTIL_CONFIRM_YES_U) return 1;
else if (matches[0] == STRING_UTIL_CONFIRM_YES) return 1;
else if (matches[0] == STRING_UTIL_CONFIRM_ALL_U) return 2;
else if (matches[0] == STRING_UTIL_CONFIRM_ALL) return 2;
else return 0;
}
////////////////////////////////////////////////////////////////////////////////
// 0 = no
// 1 = yes

View file

@ -41,7 +41,6 @@
// util.cpp
bool confirm (const std::string&);
int confirm3 (const std::string&);
int confirm4 (const std::string&);
void delay (float);
std::string formatBytes (size_t);

View file

@ -43,7 +43,6 @@ int main (int argc, char** argv)
unsetenv ("TASKRC");
// TODO bool confirm (const std::string&);
// TODO int confirm3 (const std::string&);
// TODO int confirm4 (const std::string&);
// TODO void delay (float);