File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -238,12 +238,9 @@ void ReverseInterface::disconnectionCallback(const socket_t filedescriptor)
238238 URCL_LOG_INFO (" Connection to reverse interface dropped." , filedescriptor);
239239 client_fd_ = INVALID_SOCKET;
240240 handle_program_state_ (false );
241- if (! disconnect_callbacks_. empty () )
241+ for ( auto handler : disconnect_callbacks_)
242242 {
243- for (auto handler : disconnect_callbacks_)
244- {
245- handler.function (filedescriptor);
246- }
243+ handler.function (filedescriptor);
247244 }
248245}
249246
Original file line number Diff line number Diff line change @@ -275,12 +275,9 @@ void TrajectoryPointInterface::connectionCallback(const socket_t filedescriptor)
275275void TrajectoryPointInterface::disconnectionCallback (const socket_t filedescriptor)
276276{
277277 URCL_LOG_DEBUG (" Connection to trajectory interface dropped." );
278- if (! disconnect_callbacks_. empty () )
278+ for ( auto handler : disconnect_callbacks_)
279279 {
280- for (auto handler : disconnect_callbacks_)
281- {
282- handler.function (filedescriptor);
283- }
280+ handler.function (filedescriptor);
284281 }
285282 client_fd_ = INVALID_SOCKET;
286283}
You can’t perform that action at this time.
0 commit comments