Skip to content

Commit

Permalink
Drop unused ConfigParser::QuoteString
Browse files Browse the repository at this point in the history
  • Loading branch information
yadij committed Oct 25, 2023
1 parent 6a82cc4 commit 55d10e3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
12 changes: 0 additions & 12 deletions src/ConfigParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,18 +532,6 @@ ConfigParser::NextQuotedToken()
return token;
}

SBuf
ConfigParser::QuoteString(const SBuf &var)
{
static CharacterSet alphanumeric = CharacterSet::ALPHA + CharacterSet::DIGIT;

// skip if nothing to do
if (var.findFirstNotOf(alphanumeric) == SBuf::npos)
return var;

return Format::DquoteString(var);
}

void
ConfigParser::rejectDuplicateDirective()
{
Expand Down
1 change: 0 additions & 1 deletion src/ConfigParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class ConfigParser

static void ParseUShort(unsigned short *var);
static void ParseBool(bool *var);
static SBuf QuoteString(const SBuf &);
static void ParseWordList(wordlist **list);

/**
Expand Down
4 changes: 0 additions & 4 deletions src/tests/testConfigParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ TestConfigParser::testParseQuoted()
}};

for(const auto &t : tokens) {

const auto quoted = ConfigParser::QuoteString(t.second);
CPPUNIT_ASSERT_EQUAL(t.first, quoted);

auto *line = SBufToCstring(t.first);
ConfigParser::SetCfgLine(line);
const SBuf found(ConfigParser::NextToken());
Expand Down

0 comments on commit 55d10e3

Please sign in to comment.