From 7354fb3b890bba37c81d70fc47f551d18be5c9ba Mon Sep 17 00:00:00 2001 From: Marvin Schmidt Date: Mon, 29 Aug 2022 20:58:47 +0200 Subject: 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 Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain Signed-off-by: Laurent Pinchart --- test/camera/camera_reconfigure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/camera') 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); -- cgit v1.2.1