Skip to content

Commit

Permalink
Deprecate publish call taking a raw ptr. Stop deprecating publish met…
Browse files Browse the repository at this point in the history
…hods in LifecyclePublisher.

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
  • Loading branch information
ivanpauno committed May 2, 2019
1 parent 62058d6 commit 892e1f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions rclcpp/include/rclcpp/publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ class Publisher : public PublisherBase
this->publish(std::move(unique_msg));
}

[[deprecated(
"Use publish(*msg). Check against nullptr before calling if necessary.".)]]
virtual void
publish(const MessageT * msg)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ class LifecyclePublisher : public LifecyclePublisherInterface,
* was enabled or disabled and forwards the message
* to the actual rclcpp Publisher base class
*/
[[deprecated(
"publishing an unique_ptr is prefered when using intra process communication."
" If using a shared_ptr, use publish(*msg).")]]
virtual void
publish(std::shared_ptr<const MessageT> msg)
{
Expand Down

0 comments on commit 892e1f1

Please sign in to comment.