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

Message ID 20220829185849.1884517-3-marvin.schmidt1987@gmail.com
State Accepted
Commit 252561e77f3cfc2b2792a389a03f4f6722b09803
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/ipu3/ipu3.cpp:330: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/ipu3/ipu3.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index e37b2fa0..e3c1e816 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -327,7 +327,7 @@  int IPAIPU3::init(const IPASettings &settings,
 	context_.configuration.sensor.lineDuration = sensorInfo.lineLength * 1.0s / sensorInfo.pixelRate;
 
 	/* 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(IPAIPU3, Error)