[#1745] refine flatbuffer api#1827
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1827 +/- ##
==========================================
- Coverage 76.28% 76.12% -0.16%
==========================================
Files 441 443 +2
Lines 44030 44263 +233
Branches 1356 1356
==========================================
+ Hits 33587 33695 +108
- Misses 9324 9449 +125
Partials 1119 1119
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
b69ff60 to
2b402e6
Compare
| > Builder<Payload, UserHeader, ServiceType> | ||
| { | ||
| fn has_flatbuffer_payload() -> bool { | ||
| use iceoryx2_bb_elementary_traits::type_name::TypeName; |
There was a problem hiding this comment.
Can the as ... two lines below be removed now?
| !(position < (self.start.as_ptr() as usize) | ||
| || position > (self.start.as_ptr() as usize) + self.size | ||
| || !(position - self.start.as_ptr() as usize).is_multiple_of(self.bucket_size)), |
There was a problem hiding this comment.
It would be clearer if you define self.start.as_ptr() as usize outside the debug_assert.
There was a problem hiding this comment.
I know but the stuff inside the debug assert is optimized away when the debug assertions are disabled.
There was a problem hiding this comment.
True, but you do the same with position... Up to you.
FerdinandSpitzschnueffler
left a comment
There was a problem hiding this comment.
Only some nitpicks that can be addressed in the follow-up PR.
| /// * the pointer must be acquired with [`SharedMemory::allocate()`] - extracted from the | ||
| /// [`ShmPointer`] |
There was a problem hiding this comment.
| /// * the pointer must be acquired with [`SharedMemory::allocate()`] - extracted from the | |
| /// [`ShmPointer`] | |
| /// * the pointer must be acquired with [`SharedMemory::allocate()`] |
Notes for Reviewer
This is an intermediate PR. Some flatbuffer related functionality is not yet tested.
loan_flatbuffer()instead ofloan_uninit()(not yet functional)ShmPointerfor shm allocators, required for flatbuffer allocator)PointerTraitrenamed toPointerGenericPointerrenamed toPointerFamily, allGeneric**Ptrrenamed to**PtrFamilyAllocatorreturnsPointer<u8>instead ofPointer<[u8]>when acquiring memoryPre-Review Checklist for the PR Author
Convert to draft)iox2-123-introduce-posix-ipc-example)[#123] Add posix ipc example)PR Reviewer Reminders
References
Relates to #1745