Skip to content
Snippets Groups Projects

Resolve "Emplace API inconsistent with ProcessorTrackerFeature/Landmark functions"

1 file
+ 23
6
Compare changes
  • Side-by-side
  • Inline
+ 23
6
@@ -440,11 +440,19 @@ StateBlockPtr Problem::notifyStateBlock(StateBlockPtr _state_ptr, Notification _
// Check if there is already a notification for this state block
auto notification_it = state_block_notification_map_.find(_state_ptr);
if (notification_it != state_block_notification_map_.end() && notification_it->second == _noti)
// exsiting notification for this state block
if (notification_it != state_block_notification_map_.end())
{
WOLF_WARN("This notification has been already notified");
// duplicated notification
if ( notification_it->second == _noti)
{
WOLF_WARN("This notification has been already notified");
}
// opposite notification -> cancell out eachother
else
state_block_notification_map_.erase(notification_it);
}
// Add notification (override in case of different existing ADD overwrites REMOVE or viceversa)
// Add notification
else
state_block_notification_map_[_state_ptr] = _noti;
@@ -468,11 +476,20 @@ FactorBasePtr Problem::notifyFactor(FactorBasePtr _factor_ptr, Notification _not
// Check if there is already the same notification for this factor
auto notification_it = factor_notification_map_.find(_factor_ptr);
if (notification_it != factor_notification_map_.end() && notification_it->second == _noti)
// exsiting notification for this factor
if (notification_it != factor_notification_map_.end())
{
WOLF_WARN("This notification has been already notified");
// duplicated notification
if (notification_it->second == _noti)
{
WOLF_WARN("This notification has been already notified");
}
// opposite notification -> cancell out eachother
else
factor_notification_map_.erase(notification_it);
}
// Add notification (override in case of different existing ADD overwrites REMOVE or viceversa)
// Add notification
else
factor_notification_map_[_factor_ptr] = _noti;
Loading