mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
physics: Slight code cleanup in PhysicalNode::clear()
This commit is contained in:
parent
f1782d73e5
commit
db2936a318
@ -16,12 +16,11 @@
|
||||
*/
|
||||
INLINE void PhysicalNode::
|
||||
clear() {
|
||||
PhysicalsVector::iterator it;
|
||||
for (it = _physicals.begin(); it != _physicals.end(); ++it) {
|
||||
nassertd((*it)->_physical_node == this) continue;
|
||||
(*it)->_physical_node = nullptr;
|
||||
for (Physical *physical : _physicals) {
|
||||
nassertd(physical->_physical_node == this) continue;
|
||||
physical->_physical_node = nullptr;
|
||||
}
|
||||
_physicals.erase(_physicals.begin(), _physicals.end());
|
||||
_physicals.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user