Skip to content

Commit

Permalink
Fix 3 ClangTidyReadability findings:
Browse files Browse the repository at this point in the history
* redundant string conversion

#codehealth

Tested:
    Local presubmit tests passed.
PiperOrigin-RevId: 491361570
  • Loading branch information
Mozc team authored and hiroyuki-komatsu committed Nov 28, 2022
1 parent e6ddbff commit 0826160
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/client/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/client/client_performance_test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/client/client_quality_test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0826160

Please sign in to comment.