File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
realtime_tools/include/realtime_tools Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,25 @@ class RealtimePublisher
156156
157157 const std::thread & get_thread () const { return thread_; }
158158
159- const MessageT & get_msg () const { return msg_; }
159+ [[deprecated(
160+ " This getter method will be removed. It is recommended to use the try_publish() instead of "
161+ " accessing the msg_ variable." )]]
162+ const MessageT & get_msg () const
163+ {
164+ #ifdef _MSC_VER
165+ #pragma warning(push)
166+ #pragma warning(disable : 4996)
167+ #else
168+ #pragma GCC diagnostic push
169+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
170+ #endif
171+ return msg_;
172+ #ifdef _MSC_VER
173+ #pragma warning(pop)
174+ #else
175+ #pragma GCC diagnostic pop
176+ #endif
177+ }
160178
161179 std::mutex & get_mutex () { return msg_mutex_; }
162180
You can’t perform that action at this time.
0 commit comments