mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Removed unused text.cpp guess function.
This commit is contained in:
parent
f17c59b1f6
commit
6303f1c436
2 changed files with 0 additions and 32 deletions
31
src/text.cpp
31
src/text.cpp
|
@ -475,37 +475,6 @@ const char* optionalBlankLine ()
|
|||
return context.verbose ("blank") ? newline : noline;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void guess (
|
||||
const std::string& type,
|
||||
std::vector<std::string>& options,
|
||||
std::string& candidate)
|
||||
{
|
||||
std::vector <std::string> matches;
|
||||
autoComplete (candidate, options, matches,
|
||||
context.config.getInteger ("abbreviation.minimum"));
|
||||
if (1 == matches.size ())
|
||||
candidate = matches[0];
|
||||
|
||||
else if (0 == matches.size ())
|
||||
candidate = "";
|
||||
|
||||
else
|
||||
{
|
||||
std::sort (matches.begin (), matches.end ());
|
||||
|
||||
std::string error = format (STRING_TEXT_AMBIGUOUS, type, candidate);
|
||||
for (size_t i = 0; i < matches.size (); ++i)
|
||||
{
|
||||
if (i)
|
||||
error += ", ";
|
||||
error += matches[i];
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool nontrivial (const std::string& input)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue