From eb80f759d595874a5e905a3342bd8e2af4c0a12d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 11 Dec 2023 16:16:45 -0800 Subject: Remove unnecessary conversion `GetAbsolutePathToOutputFile` returns a `std::string` and `OpenFileForWriting` takes a `std::string&`. PiperOrigin-RevId: 589984409 Change-Id: I75be9cb105f49b3a279a5d33b1b82dfcfc912cfd --- googletest/src/gtest.cc | 4 ++-- 1 file 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( -- cgit v1.2.3