From 0826160dd97be9c3f7ea4025f98c5b13a395c8d4 Mon Sep 17 00:00:00 2001 From: Mozc team Date: Tue, 29 Nov 2022 02:10:53 +0900 Subject: [PATCH] Fix 3 ClangTidyReadability findings: * redundant string conversion #codehealth Tested: Local presubmit tests passed. PiperOrigin-RevId: 491361570 --- src/client/client.cc | 2 +- src/client/client_performance_test_main.cc | 2 +- src/client/client_quality_test_main.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/client.cc b/src/client/client.cc index f70d42281..7535b4558 100644 --- a/src/client/client.cc +++ b/src/client/client.cc @@ -235,7 +235,7 @@ void Client::DumpHistorySnapshot(const std::string &filename, const std::string snapshot_file = FileUtil::JoinPath(SystemUtil::GetUserProfileDirectory(), filename); // open with append mode - OutputFileStream output(snapshot_file.c_str(), std::ios::app); + OutputFileStream output(snapshot_file, std::ios::app); output << "---- Start history snapshot for " << label << std::endl; output << "Created at " << Logging::GetLogMessageHeader() << std::endl; diff --git a/src/client/client_performance_test_main.cc b/src/client/client_performance_test_main.cc index e0b34c329..f7cca736a 100644 --- a/src/client/client_performance_test_main.cc +++ b/src/client/client_performance_test_main.cc @@ -380,7 +380,7 @@ int main(int argc, char **argv) { std::ostream *ofs = &std::cout; if (!absl::GetFlag(FLAGS_log_path).empty()) { - ofs = new mozc::OutputFileStream(absl::GetFlag(FLAGS_log_path).c_str()); + ofs = new mozc::OutputFileStream(absl::GetFlag(FLAGS_log_path)); } // TODO(taku): generate histogram with ChartAPI diff --git a/src/client/client_quality_test_main.cc b/src/client/client_quality_test_main.cc index 6b0c7fb77..10a734860 100644 --- a/src/client/client_quality_test_main.cc +++ b/src/client/client_quality_test_main.cc @@ -254,7 +254,7 @@ int main(int argc, char* argv[]) { std::ostream* ofs = &std::cout; if (!absl::GetFlag(FLAGS_log_path).empty()) { - ofs = new mozc::OutputFileStream(absl::GetFlag(FLAGS_log_path).c_str()); + ofs = new mozc::OutputFileStream(absl::GetFlag(FLAGS_log_path)); } // Average the scores