File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
realtime_tools/include/realtime_tools Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -264,19 +264,26 @@ class RealtimePublisher
264264 std::thread & get_thread () { return thread_; }
265265
266266 const std::thread & get_thread () const { return thread_; }
267+
268+ [[deprecated(
269+ " This getter method will be removed. It is recommended to use the try_publish() instead of "
270+ " accessing the msg_ variable." )]]
271+ const MessageT & get_msg () const
272+ {
267273#ifdef _MSC_VER
268274#pragma warning(push)
269275#pragma warning(disable : 4996)
270276#else
271277#pragma GCC diagnostic push
272278#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
273279#endif
274- const MessageT & get_msg () const { return msg_; }
280+ return msg_;
275281#ifdef _MSC_VER
276282#pragma warning(pop)
277283#else
278284#pragma GCC diagnostic pop
279285#endif
286+ }
280287
281288 std::mutex & get_mutex () { return msg_mutex_; }
282289
You can’t perform that action at this time.
0 commit comments