summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarvin Schmidt <marvin.schmidt1987@gmail.com>2022-08-29 20:58:47 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-30 15:26:38 +0300
commit7354fb3b890bba37c81d70fc47f551d18be5c9ba (patch)
tree9574808647181fe8bcd4623577a419fe703531dc /test
parent18764a15c7062e241df3ffb587bf44d0c14c898d (diff)
test: camera: Remove redundant call of std::string::c_str()
libcamera::File::exists() takes a const reference to a std::string and clang-tidy's readability-redundant-string-cstr check warns about it: > ../test/camera/camera_reconfigure.cpp:182:21: warning: redundant call to 'c_str' [readability-redundant-string-cstr] > if (File::exists(pname.c_str())) { > ^~~~~~~~~~~~~ > pname Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test')
-rw-r--r--test/camera/camera_reconfigure.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/camera/camera_reconfigure.cpp b/test/camera/camera_reconfigure.cpp
index f6076baa..d12e2413 100644
--- a/test/camera/camera_reconfigure.cpp
+++ b/test/camera/camera_reconfigure.cpp
@@ -179,7 +179,7 @@ private:
continue;
string pname("/proc/" + string(ptr->d_name) + "/comm");
- if (File::exists(pname.c_str())) {
+ if (File::exists(pname)) {
ifstream pfile(pname.c_str());
string comm;
getline(pfile, comm);