Skip to content

Commit

Permalink
Remove unnecessary conversion
Browse files Browse the repository at this point in the history
`GetAbsolutePathToOutputFile` returns a `std::string` and `OpenFileForWriting`
takes a `std::string&`.

PiperOrigin-RevId: 589984409
Change-Id: I75be9cb105f49b3a279a5d33b1b82dfcfc912cfd
  • Loading branch information
thughes authored and Copybara-Service committed Dec 12, 2023
1 parent b3a9ba2 commit eb80f75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions googletest/src/gtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit eb80f75

Please sign in to comment.