Showing the changes to assignment-client/src/AssignmentClientMonitor.cpp (1 of 144 files). Show all
Unified · Split
| @@ -9,6 +9,7 @@ · 8 unmodified lines | ||
| 9 | 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 10 | 10 | // |
| 11 | 11 | |
| 12 | +#include <memory> | |
| 12 | 13 | #include <signal.h> |
| 13 | 14 | |
| 14 | 15 | #include <AddressManager.h> |
| @@ -227,8 +228,9 @@ void AssignmentClientMonitor::handleChildStatusPacket(QSharedPointer<ReceivedMes · 212 unmodified lines | ||
| 227 | 228 | matchingNode = DependencyManager::get<LimitedNodeList>()->addOrUpdateNode |
| 228 | 229 | (senderID, NodeType::Unassigned, senderSockAddr, senderSockAddr, false, false); |
| 229 | 230 | |
| 230 | − childData = new AssignmentClientChildData(Assignment::Type::AllTypes); | |
| 231 | − matchingNode->setLinkedData(childData); | |
| 231 | + auto childData = std::unique_ptr<AssignmentClientChildData> | |
| 232 | + { new AssignmentClientChildData(Assignment::Type::AllTypes) }; | |
| 233 | + matchingNode->setLinkedData(std::move(childData)); | |
| 232 | 234 | } else { |
| 233 | 235 | // tell unknown assignment-client child to exit. |
| 234 | 236 | qDebug() << "Asking unknown child at" << senderSockAddr << "to exit."; |