-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix floorplanjs issue #5341
base: develop
Are you sure you want to change the base?
Fix floorplanjs issue #5341
Conversation
} | ||
|
||
std::string storyColor; | ||
std::string storyColor = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is pointless. The default ctor is an empty string already, equivalent to ""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we don't need it, was thinking following the next lines.
@@ -1078,11 +1078,10 @@ ThreeScene FloorplanJS::toThreeScene(bool openstudioFormat) const { | |||
for (Json::ArrayIndex storyIdx = 0; storyIdx < storyN; ++storyIdx) { | |||
|
|||
if (checkKeyAndType(stories[storyIdx], "name", Json::stringValue)) { | |||
std::string storyName = stories[storyIdx].get("name", storyName).asString(); | |||
buildingStoryNames.push_back(storyName); | |||
buildingStoryNames.push_back(stories[storyIdx].get("name", "").asString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old notation was definitely extremely weird to look at. It's weird that this compiles, but I guess we shush some warnings, and especially we use -Wno-uninitialized
CI Results for d25307b:
|
Pull request overview
Fix the test about floorPlanJS.
The line:
contains bad initilization which is using the storyName before it initilizaed properly.
The bad initiliazation trigger some kind of undefined behavior and the undefined behavior is ....undefined.
Therefore, somehow it works, somehow it broken.
Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.
A run of tests from the remote CI box:
TODO: