Skip to content

Commit

Permalink
a couple of typo fixes in doc section for LoanedMessage. (#2676)
Browse files Browse the repository at this point in the history
* rephrase doc section of LoanedMessage Class.

Signed-off-by: Tomoya Fujita <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Christophe Bedard <[email protected]>
  • Loading branch information
3 people authored Nov 19, 2024
1 parent 88ebea9 commit e854bb2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rclcpp/include/rclcpp/loaned_message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,19 @@ class LoanedMessage
* The constructor of this class allocates memory for a given message type
* and associates this with a given publisher.
*
* Given the publisher instance, a case differentiation is being performaned
* which decides whether the underlying middleware is able to allocate the appropriate
* memory for this message type or not.
* In the case that the middleware can not loan messages, the passed in allocator instance
* is being used to allocate the message within the scope of this class.
* Otherwise, the allocator is being ignored and the allocation is solely performaned
* The underlying middleware is queried to determine whether it is able to allocate the
* appropriate memory for this message type or not.
* In the case that the middleware cannot loan messages, the passed in allocator instance
* is used to allocate the message within the scope of this class.
* Otherwise, the allocator is ignored and the allocation is solely performed
* in the underlying middleware with its appropriate allocation strategy.
* The need for this arises as the user code can be written explicitly targeting a middleware
* capable of loaning messages.
* However, this user code is ought to be usable even when dynamically linked against
* a middleware which doesn't support message loaning in which case the allocator will be used.
*
* \param[in] pub rclcpp::Publisher instance to which the memory belongs
* \param[in] allocator Allocator instance in case middleware can not allocate messages
* \param[in] allocator Allocator instance in case middleware cannot allocate messages
* \throws anything rclcpp::exceptions::throw_from_rcl_error can throw.
*/
LoanedMessage(
Expand Down

0 comments on commit e854bb2

Please sign in to comment.