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

Iox-#2128 named segment selection #4

Open
wants to merge 1 commit into
base: iox-#2128-publish-options-segment-name
Choose a base branch
from

Conversation

gpalmer-latai
Copy link
Owner

Pre-Review Checklist for the PR Author

  1. Add a second reviewer for complex new features or larger refactorings
  2. Code follows the coding style of CONTRIBUTING.md
  3. Tests follow the best practice for testing
  4. Changelog updated in the unreleased section including API breaking changes
  5. Branch follows the naming format (iox-123-this-is-a-branch)
  6. Commits messages are according to this guideline
  7. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  8. Relevant issues are linked
  9. Add sensible notes for the reviewer
  10. All checks have passed (except task-list-completed)
  11. All touched (C/C++) source code files from iceoryx_hoofs are added to ./clang-tidy-diff-scans.txt
  12. Assign PR to reviewer

Notes for Reviewer

PR #3 in the chain implementing eclipse-iceoryx#2128 whose design is described here

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • All touched (C/C++) source code files from iceoryx_hoofs have been added to ./clang-tidy-diff-scans.txt
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

  • Closes TBD

@gpalmer-latai gpalmer-latai force-pushed the iox-#2128-named-segment-selection branch from e4ba809 to a28d59f Compare January 16, 2024 17:43
Copy link

@anolley-latai anolley-latai left a comment

Choose a reason for hiding this comment

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

Very minor comments and looks good overall.

{
if (segment.getSegmentName() == name)
{
//Verify that the user has write access to this segment.

Choose a reason for hiding this comment

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

Suggested change
//Verify that the user has write access to this segment.
// Verify that the user has write access to this segment.

[nit]

// None was found so we return the default info.
return err(SegmentLookupError::NoWriteAccess);

Choose a reason for hiding this comment

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

Should this comment apply to the lower return statement instead? If so, can you add another comment to this return as well?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Sorry, comment was left over from my POC implementation. This code here used to return default structures which I found ugly and decided to refactor to expected return types.

Comment on lines -81 to +82
optional<std::reference_wrapper<MemoryManager>> m_memoryManager;
MemoryManager& m_memoryManager;

Choose a reason for hiding this comment

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

You simplified the usage of the return value for the caller, nice!

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah this was weird. I think it must have been written before iox::expected existed and nobody ever bothered refactoring after the fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants