-
Notifications
You must be signed in to change notification settings - Fork 38
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
Api cleanup + SetManifest for Merger #118
Conversation
@@ -70,7 +70,7 @@ final { | |||
} | |||
|
|||
// temporary implementation | |||
fsa::automata_t GetFsa() { | |||
fsa::automata_t GetFsa() const { |
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.
I suggest have this getter without const
qualifier, otherwise its possible to get the pointer from const Dictionary and modify the internal state from outside.
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.
or we can have a const
qualifier, but with return type std::shared_ptr<const Automata>
which assures read-only behavior
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.
hmm, there is no internal state in Automata. So the only state would be the shared pointer itself. I will try it.
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.
@@ -69,8 +69,7 @@ final { | |||
: fsa_(f) { | |||
} | |||
|
|||
// temporary implementation | |||
fsa::automata_t GetFsa() const { | |||
const fsa::automata_t GetFsa() const { |
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.
The first const
is not needed, anyway the return value is a temporary object.
LGTM! |
Api cleanup + SetManifest for Merger
cleanup parts from #115