Skip to content

Commit

Permalink
Use fs::path::string method to get windows compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Jul 23, 2024
1 parent 5d4c911 commit 9cfd988
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/EnergyPlus/api/datatransfer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void resetErrorFlag(EnergyPlusState state)
char *inputFilePath(EnergyPlusState state)
{
const auto *thisState = static_cast<EnergyPlus::EnergyPlusData *>(state);
char *p = new char[std::strlen(thisState->dataStrGlobals->inputFilePath.c_str()) + 1];
char *p = new char[std::strlen(thisState->dataStrGlobals->inputFilePath.string().c_str()) + 1];
std::strcpy(p, thisState->dataStrGlobals->inputFilePath.c_str());
return p;
}
Expand Down
2 changes: 1 addition & 1 deletion tst/EnergyPlus/api/TestDataTransfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void afterZoneTimeStepHandler(EnergyPlusState state)
exit(1);
}

char * filePath = inputFilePath(state);
char *filePath = inputFilePath(state);
printf("Input file path accessed via API: %s\n", filePath);
free(filePath);

Expand Down

3 comments on commit 9cfd988

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACoupleAPIEndpoints (Myoldmopar) - Win64-Windows-10-VisualStudio-16: Build Failed

Failures:\n

API Test Summary

  • Failed: 10
  • notrun: 5

integration Test Summary

  • Passed: 2
  • Failed: 792

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACoupleAPIEndpoints (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3685 of 3685 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACoupleAPIEndpoints (Myoldmopar) - x86_64-MacOS-10.18-clang-15.0.0: OK (3644 of 3644 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.