Merged
Conversation
The memento should be deleted after it is restored.
cc70925 to
5b98cdc
Compare
Contributor
|
Thanks! |
Contributor
Author
|
You are welcome! Thank you for the great book! I really enjoy reading it and the examples in many different languages a great! Had to laugh hard about the hippie joke btw😄Am 13.03.2025 um 10:31 schrieb Alexander Shvets ***@***.***>:
Thanks!—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
neochief left a comment (RefactoringGuru/design-patterns-cpp#12)
Thanks!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Contributor
Contributor
Author
|
I am still a C++ noob as well and am also a Linux user. I booted a Windows VM though to check. The only necessary change in that commit is the one for the Facade. GCC does automatically deduce the empty branch in the ternary, but MVSC does throw an error. The author of the commit himself said that he had aggressive warnings turned on. I don't think it should be necessary to fix all of those. Other things I have noticed:
|
Contributor
|
@jclsn Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The memento should be deleted after it is restored.
In a real example you would probably use
std::shared_ptrfor this, but I see the advantage of not using too many advanced data structures when teaching about patterns.