diff --git a/src/inet/physicallayer/wireless/common/neighborcache/NeighborListNeighborCache.cc b/src/inet/physicallayer/wireless/common/neighborcache/NeighborListNeighborCache.cc index 93e4aff2825..f3254a229d1 100644 --- a/src/inet/physicallayer/wireless/common/neighborcache/NeighborListNeighborCache.cc +++ b/src/inet/physicallayer/wireless/common/neighborcache/NeighborListNeighborCache.cc @@ -127,7 +127,7 @@ void NeighborListNeighborCache::updateNeighborLists() void NeighborListNeighborCache::removeRadioFromNeighborLists(const IRadio *radio) { for (auto& elem : radios) { - Radios neighborVector = elem->neighborVector; + Radios& neighborVector = elem->neighborVector; auto it = find(neighborVector, radio); if (it != neighborVector.end()) neighborVector.erase(it);