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>
This commit is contained in:
Marvin Schmidt 2022-08-29 20:58:47 +02:00 committed by Laurent Pinchart
parent 18764a15c7
commit 7354fb3b89

View file

@ -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);