Merge pull request #1525 from wingo/remove-buggy-octal-decoder

Remove unused decodeOctalEscaped
This commit is contained in:
Eelco Dolstra 2017-08-18 12:01:41 +02:00 committed by GitHub
commit e56e790642
2 changed files with 0 additions and 21 deletions

View file

@ -1140,21 +1140,6 @@ std::string toLower(const std::string & s)
}
string decodeOctalEscaped(const string & s)
{
string r;
for (string::const_iterator i = s.begin(); i != s.end(); ) {
if (*i != '\\') { r += *i++; continue; }
unsigned char c = 0;
++i;
while (i != s.end() && *i >= '0' && *i < '8')
c = c * 8 + (*i++ - '0');
r += c;
}
return r;
}
void ignoreException()
{
try {

View file

@ -349,12 +349,6 @@ bool hasSuffix(const string & s, const string & suffix);
std::string toLower(const std::string & s);
/* Escape a string that contains octal-encoded escape codes such as
used in /etc/fstab and /proc/mounts (e.g. "foo\040bar" decodes to
"foo bar"). */
string decodeOctalEscaped(const string & s);
/* Exception handling in destructors: print an error message, then
ignore the exception. */
void ignoreException();