diff options
author | Tom Hughes <tomhughes@google.com> | 2023-12-11 16:16:45 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-12-11 16:17:28 -0800 |
commit | eb80f759d595874a5e905a3342bd8e2af4c0a12d (patch) | |
tree | 3b0b254d718584e0cb325415e72cfa846c02013c | |
parent | b3a9ba2b8e975550799838332803d468797ae2e1 (diff) | |
download | googletest-eb80f759d595874a5e905a3342bd8e2af4c0a12d.tar.gz |
Remove unnecessary conversion
`GetAbsolutePathToOutputFile` returns a `std::string` and `OpenFileForWriting`
takes a `std::string&`.
PiperOrigin-RevId: 589984409
Change-Id: I75be9cb105f49b3a279a5d33b1b82dfcfc912cfd
-rw-r--r-- | googletest/src/gtest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 85d45b58..479b2ee3 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -6203,8 +6203,8 @@ void UnitTestImpl::ListTestsMatchingFilter() { #if GTEST_HAS_FILE_SYSTEM const std::string& output_format = UnitTestOptions::GetOutputFormat(); if (output_format == "xml" || output_format == "json") { - FILE* fileout = OpenFileForWriting( - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); + FILE* fileout = + OpenFileForWriting(UnitTestOptions::GetAbsolutePathToOutputFile()); std::stringstream stream; if (output_format == "xml") { XmlUnitTestResultPrinter( |