Code Cleanup

- Removed unused util.cpp escape function.
This commit is contained in:
Paul Beckingham 2014-09-07 17:27:50 -04:00
parent 66bb5b3906
commit adee92a6b9
2 changed files with 0 additions and 23 deletions

View file

@ -325,27 +325,6 @@ int execute (
// Collides with std::numeric_limits methods
#undef max
////////////////////////////////////////////////////////////////////////////////
// Escapes any unescaped character of type c within the given string
// e.g. ' ' -> '\ '
const std::string escape (const std::string& value, char c)
{
std::string modified = value;
char tmp[2] = {c, '\0'};
std::string search = tmp;
std::string replace = "\\" + search;
std::string::size_type pos = modified.find (search);
while (pos != std::string::npos) {
if ( modified[pos-1] != '\\' )
modified.replace (pos, 1, replace);
pos = modified.find (search, pos+1);
}
return modified;
}
////////////////////////////////////////////////////////////////////////////////
// Accept a list of projects, and return an indented list
// that reflects the hierarchy.

View file

@ -61,8 +61,6 @@ int execute (const std::string&, const std::vector <std::string>&, const std::st
int flock (int, int);
#endif
const std::string escape (const std::string&, char);
const std::vector<std::string> indentTree (
const std::vector<std::string>&,
const std::string& whitespace = " ",