mirror of
https://github.com/google/googletest.git
synced 2024-12-27 18:31:21 +08:00
Remove unnecessary conversion
`GetAbsolutePathToOutputFile` returns a `std::string` and `OpenFileForWriting` takes a `std::string&`. PiperOrigin-RevId: 589984409 Change-Id: I75be9cb105f49b3a279a5d33b1b82dfcfc912cfd
This commit is contained in:
parent
b3a9ba2b8e
commit
eb80f759d5
@ -6203,8 +6203,8 @@ void UnitTestImpl::ListTestsMatchingFilter() {
|
|||||||
#if GTEST_HAS_FILE_SYSTEM
|
#if GTEST_HAS_FILE_SYSTEM
|
||||||
const std::string& output_format = UnitTestOptions::GetOutputFormat();
|
const std::string& output_format = UnitTestOptions::GetOutputFormat();
|
||||||
if (output_format == "xml" || output_format == "json") {
|
if (output_format == "xml" || output_format == "json") {
|
||||||
FILE* fileout = OpenFileForWriting(
|
FILE* fileout =
|
||||||
UnitTestOptions::GetAbsolutePathToOutputFile().c_str());
|
OpenFileForWriting(UnitTestOptions::GetAbsolutePathToOutputFile());
|
||||||
std::stringstream stream;
|
std::stringstream stream;
|
||||||
if (output_format == "xml") {
|
if (output_format == "xml") {
|
||||||
XmlUnitTestResultPrinter(
|
XmlUnitTestResultPrinter(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user