mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 12:58:52 +08:00
List: handle re-inserting
- clear sibling on removal - add reinsertion test case to test_list
This commit is contained in:
@@ -95,6 +95,8 @@ public:
|
||||
_head = _head->getSibling();
|
||||
}
|
||||
|
||||
removeNode->setSibling(nullptr);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -109,6 +111,8 @@ public:
|
||||
node->setSibling(nullptr);
|
||||
}
|
||||
|
||||
removeNode->setSibling(nullptr);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user