cmd_getval() consumes string_view, so no need to create a temporary
std::string instance for it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
{
bool v;
try {
- if (!cmd_getval(cmdmap, string(name), v)) {
+ if (!cmd_getval(cmdmap, name, v)) {
if (auto req = desc.find("req");
req != end(desc) && req->second == "false") {
return true;
{
Value v;
try {
- if (!cmd_getval(cmdmap, string(name), v)) {
+ if (!cmd_getval(cmdmap, name, v)) {
if constexpr (is_vector) {
// an empty list is acceptable.
return true;