Skip to content

Conversation

@wdednam
Copy link
Contributor

@wdednam wdednam commented Dec 13, 2024

…e stability, and refactored tests that call findVariable.


This change is Reviewable

…e stability and refactored tests using findVariable
Copy link
Contributor Author

@wdednam wdednam left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @wdednam)

auto& canvas = minsky.canvas;

canvas.item.reset();
canvas.item.reset(); // Reset the item to ensure no leftover references

Choose a reason for hiding this comment

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

indentation has gone a bit weird

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops. I must have accidentally pressed the tab key on that line. I'll check the indentation more carefully prior to a pull request next time.

canvas.item = canvas.model->groups.front();
else
minsky.model->recursiveDo(&GroupItems::items, [&](const Items&, Items::const_iterator i)
bool found = false;

Choose a reason for hiding this comment

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

This found flag is redundant. It just shadows the validity status of canvas.item

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood. I was getting a segfault in the renameVariables.sh test, so I used it for added safety.

return false;
});

if (!found || !canvas.item)

Choose a reason for hiding this comment

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

found flag redundant here too.

@highperformancecoder highperformancecoder merged commit 51a10f8 into highperformancecoder:master Dec 14, 2024
4 of 5 checks passed
@wdednam wdednam deleted the findVariableToPyminskyClass branch December 16, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants