mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -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::
|
INLINE void PhysicalNode::
|
||||||
clear() {
|
clear() {
|
||||||
PhysicalsVector::iterator it;
|
for (Physical *physical : _physicals) {
|
||||||
for (it = _physicals.begin(); it != _physicals.end(); ++it) {
|
nassertd(physical->_physical_node == this) continue;
|
||||||
nassertd((*it)->_physical_node == this) continue;
|
physical->_physical_node = nullptr;
|
||||||
(*it)->_physical_node = nullptr;
|
|
||||||
}
|
}
|
||||||
_physicals.erase(_physicals.begin(), _physicals.end());
|
_physicals.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user