clang-tidy: Enable readability-redundant-string-cstr check
This check finds unnecessary calls to std::string::c_str() and
std::string::data().
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I4ff9cd7f1595a1cd7c6dbab4c7a80d6f7cf05ca2
diff --git a/utils.cpp b/utils.cpp
index 1da9602..04488b2 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -113,7 +113,7 @@
"GetSubTreePaths");
method.append(objectPath.c_str());
method.append(0); // Depth 0 to search all
- method.append(std::vector<std::string>({interface.c_str()}));
+ method.append(std::vector<std::string>({interface}));
auto reply = bus.call(method);
reply.read(paths);