mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
[clang-tidy] Add const where it makes sense
Found with readability-redundant-string-init Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
bf40ea8816
commit
defd49b13d
1 changed files with 2 additions and 2 deletions
|
@ -271,7 +271,7 @@ void CLI2::applyOverrides (int argc, const char** argv)
|
||||||
return s.find_first_of (":=", 3);
|
return s.find_first_of (":=", 3);
|
||||||
return std::string::npos;
|
return std::string::npos;
|
||||||
};
|
};
|
||||||
auto override_settings = [&] (std::string raw)
|
auto override_settings = [&] (const std::string& raw)
|
||||||
{
|
{
|
||||||
auto sep = get_sep (raw);
|
auto sep = get_sep (raw);
|
||||||
if (sep == std::string::npos)
|
if (sep == std::string::npos)
|
||||||
|
@ -280,7 +280,7 @@ void CLI2::applyOverrides (int argc, const char** argv)
|
||||||
std::string value = raw.substr (sep + 1);
|
std::string value = raw.substr (sep + 1);
|
||||||
context.config.set (name, value);
|
context.config.set (name, value);
|
||||||
};
|
};
|
||||||
auto display_overrides = [&] (std::string raw)
|
auto display_overrides = [&] (const std::string& raw)
|
||||||
{
|
{
|
||||||
if (is_override (raw))
|
if (is_override (raw))
|
||||||
context.footnote (format ("Configuration override {1}", raw));
|
context.footnote (format ("Configuration override {1}", raw));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue