mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 10:16:01 +08:00
[cpp] Simplified setAttachment deform clear logic, fewer parens.
This commit is contained in:
parent
634e041ed8
commit
2d34b84f46
@ -99,15 +99,12 @@ void Slot::setAttachment(Attachment *inValue) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!inValue || !_attachment) {
|
if (!inValue ||
|
||||||
|
!_attachment ||
|
||||||
|
!inValue->getRTTI().instanceOf(VertexAttachment::rtti) ||
|
||||||
|
!_attachment->getRTTI().instanceOf(VertexAttachment::rtti) ||
|
||||||
|
static_cast<VertexAttachment *>(inValue)->getDeformAttachment() != static_cast<VertexAttachment *>(_attachment)->getDeformAttachment()) {
|
||||||
_deform.clear();
|
_deform.clear();
|
||||||
} else {
|
|
||||||
if (!(inValue->getRTTI().instanceOf(VertexAttachment::rtti)) ||
|
|
||||||
!(_attachment->getRTTI().instanceOf(VertexAttachment::rtti)) ||
|
|
||||||
(static_cast<VertexAttachment *>(inValue)->getDeformAttachment() !=
|
|
||||||
(static_cast<VertexAttachment *>(_attachment)->getDeformAttachment()))) {
|
|
||||||
_deform.clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_attachment = inValue;
|
_attachment = inValue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user