-
-
Notifications
You must be signed in to change notification settings - Fork 62
added findVariable method to pyminsky class, updated findObject to guarante ... #533
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
added findVariable method to pyminsky class, updated findObject to guarante ... #533
Conversation
…e stability and refactored tests using findVariable
wdednam
left a comment
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: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 |
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.
indentation has gone a bit weird
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.
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; |
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 found flag is redundant. It just shadows the validity status of canvas.item
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.
Understood. I was getting a segfault in the renameVariables.sh test, so I used it for added safety.
| return false; | ||
| }); | ||
|
|
||
| if (!found || !canvas.item) |
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.
found flag redundant here too.
51a10f8
into
highperformancecoder:master
…e stability, and refactored tests that call findVariable.
This change is