Skip to content
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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/utilities/geometry/FloorplanJS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Copy link
Collaborator

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

}

std::string storyColor;
std::string storyColor = "";
Copy link
Collaborator

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 ""

Copy link
Collaborator Author

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.

jmarrec marked this conversation as resolved.
Show resolved Hide resolved
if (checkKeyAndType(stories[storyIdx], "color", Json::stringValue)) {
storyColor = stories[storyIdx].get("color", storyColor).asString();
}
Expand Down
Loading