Revert "[clang-tidy] Use '' for single characters"

This reverts commit e3ceda9ce1.
This commit is contained in:
Paul Beckingham 2020-12-05 16:18:15 -05:00
parent c3ecfac4f5
commit 3eb209f248
3 changed files with 7 additions and 7 deletions

View file

@ -231,7 +231,7 @@ bool CLI2::getOverride (int argc, const char** argv, std::string& home, File& rc
if (value == nullptr) if (value == nullptr)
return false; return false;
rc = File (value); rc = File (value);
if (rc._data.rfind ('/') != std::string::npos) if (rc._data.rfind ("/") != std::string::npos)
home = rc.parent (); home = rc.parent ();
else else
home = "."; home = ".";
@ -1483,7 +1483,7 @@ void CLI2::findIDs ()
for (auto& element : elements) for (auto& element : elements)
{ {
changes = true; changes = true;
auto hyphen = element.find ('-'); auto hyphen = element.find ("-");
if (hyphen != std::string::npos) if (hyphen != std::string::npos)
_id_ranges.emplace_back(element.substr (0, hyphen), element.substr (hyphen + 1)); _id_ranges.emplace_back(element.substr (0, hyphen), element.substr (hyphen + 1));
else else
@ -1538,7 +1538,7 @@ void CLI2::findIDs ()
for (const auto& element : elements) for (const auto& element : elements)
{ {
changes = true; changes = true;
auto hyphen = element.find ('-'); auto hyphen = element.find ("-");
if (hyphen != std::string::npos) if (hyphen != std::string::npos)
_id_ranges.emplace_back(element.substr (0, hyphen), element.substr (hyphen + 1)); _id_ranges.emplace_back(element.substr (0, hyphen), element.substr (hyphen + 1));
else else

View file

@ -1671,7 +1671,7 @@ bool Lexer::decomposeSubstitution (
if (readWord (text, "/", cursor, parsed_to)) if (readWord (text, "/", cursor, parsed_to))
{ {
std::string parsed_flags = text.substr (cursor); std::string parsed_flags = text.substr (cursor);
if (parsed_flags.find ('/') == std::string::npos) if (parsed_flags.find ("/") == std::string::npos)
{ {
dequote (parsed_from, "/"); dequote (parsed_from, "/");
dequote (parsed_to, "/"); dequote (parsed_to, "/");
@ -1700,7 +1700,7 @@ bool Lexer::decomposePattern (
ignored.length ()) ignored.length ())
{ {
auto parsed_flags = text.substr (cursor); auto parsed_flags = text.substr (cursor);
if (parsed_flags.find ('/') == std::string::npos) if (parsed_flags.find ("/") == std::string::npos)
{ {
flags = parsed_flags; flags = parsed_flags;
pattern = text.substr (1, cursor - 2 - flags.length ()); pattern = text.substr (1, cursor - 2 - flags.length ());

View file

@ -279,7 +279,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
out += extra; out += extra;
// Trim right. // Trim right.
out.erase (out.find_last_not_of (' ') + 1); out.erase (out.find_last_not_of (" ") + 1);
out += "\n"; out += "\n";
// Stop if the line limit is exceeded. // Stop if the line limit is exceeded.
@ -365,7 +365,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
out += (odd ? extra_odd : extra_even); out += (odd ? extra_odd : extra_even);
// Trim right. // Trim right.
out.erase (out.find_last_not_of (' ') + 1); out.erase (out.find_last_not_of (" ") + 1);
out += "\n"; out += "\n";
// Stop if the line limit is exceeded. // Stop if the line limit is exceeded.