diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-08-01 13:42:14 -0700 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-08-04 20:55:45 -0700 |
commit | ca9d3e6e00ec452701d9d3b7e909eff61799f739 (patch) | |
tree | c56d28840835fabdfd70589a45a0ecf1a7accf80 /tests | |
parent | 9238e62ae6b7b8bf00d53b48e0c3ae33285dd4ab (diff) |
tree-wide: fix various lint warnings
Change-Id: I0fc80718eb7e02d84cc4b5d5deec4c0f41116134
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/libutil-support/tests/cli-literate-parser.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/unit/libutil-support/tests/cli-literate-parser.cc b/tests/unit/libutil-support/tests/cli-literate-parser.cc index f74fe85eb..3aa55859c 100644 --- a/tests/unit/libutil-support/tests/cli-literate-parser.cc +++ b/tests/unit/libutil-support/tests/cli-literate-parser.cc @@ -1,20 +1,16 @@ #include "cli-literate-parser.hh" #include "escape-string.hh" -#include "escape-char.hh" -#include "libexpr/print.hh" #include "types.hh" #include <ranges> #include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/trim.hpp> #include <iostream> -#include <memory> #include <sstream> #include <variant> #include "cli-literate-parser.hh" #include "escape-string.hh" #include "fmt.hh" -#include "libexpr/print.hh" #include "shlex.hh" #include "types.hh" #include "strings.hh" @@ -361,9 +357,8 @@ const char * ParseError::what() const noexcept return what_->c_str(); } else { auto escaped = escapeString(rest, {.maxLength = 256, .escapeNonPrinting = true}); - auto hint = - new HintFmt("Parse error: Expected %1%, got:\n%2%", expected, Uncolored(escaped)); - what_ = hint->str(); + auto hint = HintFmt("Parse error: Expected %1%, got:\n%2%", expected, Uncolored(escaped)); + what_ = hint.str(); return what_->c_str(); } } |