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

Use unique_ptr for Grid in Cell #782

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

tobiolo
Copy link
Collaborator

@tobiolo tobiolo commented Dec 10, 2024

No description provided.

@tobiolo tobiolo force-pushed the unique_ptr-cell-grid branch from 1b2bb8e to 1f27d12 Compare December 10, 2024 19:42
@tobiolo tobiolo requested a review from aardappel December 10, 2024 19:43
@tobiolo tobiolo changed the title Unique ptr cell grid Use unique_ptr for Grid in Cell Dec 10, 2024
@tobiolo tobiolo force-pushed the unique_ptr-cell-grid branch 2 times, most recently from 29a2f0b to 28741c8 Compare December 10, 2024 20:03
src/grid.h Outdated
@@ -1045,7 +1043,10 @@ struct Grid {
}
}
if (rest) {
swap_(c->grid, rest->grid);
Grid *cg = c->grid.release();
Copy link
Owner

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed! :-)

Make it clear that Cell owns Grid `grid`.
@tobiolo tobiolo force-pushed the unique_ptr-cell-grid branch from 28741c8 to 7a9f3da Compare December 10, 2024 20:41
@tobiolo tobiolo requested a review from aardappel December 10, 2024 20:52
@aardappel aardappel merged commit 9fe088a into aardappel:master Dec 10, 2024
4 checks passed
@tobiolo tobiolo deleted the unique_ptr-cell-grid branch December 10, 2024 21:29
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