Code Cleanup

- Removed unused text.cpp guess function.
This commit is contained in:
Paul Beckingham 2014-09-07 16:30:27 -04:00
parent f17c59b1f6
commit 6303f1c436
2 changed files with 0 additions and 32 deletions

View file

@ -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)
{

View file

@ -50,7 +50,6 @@ std::string ucFirst (const std::string&);
const std::string str_replace (std::string&, const std::string&, const std::string&);
const std::string str_replace (const std::string&, const std::string&, const std::string&);
const char* optionalBlankLine ();
void guess (const std::string&, std::vector<std::string>&, std::string&);
bool nontrivial (const std::string&);
bool digitsOnly (const std::string&);
bool noSpaces (const std::string&);