[libcamera-devel,3/3] ipa: rkisp1: Remove redundant call of std::string::c_str()
diff mbox series

Message ID 20220829185849.1884517-4-marvin.schmidt1987@gmail.com
State Accepted
Commit 372621352de4b201568b03b51970b1f72e886fa6
Headers show
Series
  • Remove redundant calls to std::string::c_str()
Related show

Commit Message

Marvin Schmidt Aug. 29, 2022, 6:58 p.m. UTC
The constructor of libcamera::File takes a const reference to a std::string
and clang-tidy's readability-redundant-string-cstr check warns about it:

> ../src/ipa/rkisp1/rkisp1.cpp:147:12: warning: redundant call to 'c_str' [readability-redundant-string-cstr]
>         File file(settings.configurationFile.c_str());
>                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>                   settings.configurationFile

Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com>
---
 src/ipa/rkisp1/rkisp1.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 27b4212b..9e3eb7fb 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -144,7 +144,7 @@  int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,
 	}
 
 	/* Load the tuning data file. */
-	File file(settings.configurationFile.c_str());
+	File file(settings.configurationFile);
 	if (!file.open(File::OpenModeFlag::ReadOnly)) {
 		int ret = file.error();
 		LOG(IPARkISP1, Error)