mirror of https://github.com/axmolengine/axmol.git
Avoid const_cast when calling Node::setAdditionalTransform
This commit is contained in:
parent
d7cb7676bc
commit
2a853ba73e
|
@ -1800,7 +1800,7 @@ void Node::setAdditionalTransform(const AffineTransform& additionalTransform)
|
|||
setAdditionalTransform(&tmp);
|
||||
}
|
||||
|
||||
void Node::setAdditionalTransform(Mat4* additionalTransform)
|
||||
void Node::setAdditionalTransform(const Mat4* additionalTransform)
|
||||
{
|
||||
if (additionalTransform == nullptr)
|
||||
{
|
||||
|
@ -1823,8 +1823,7 @@ void Node::setAdditionalTransform(Mat4* additionalTransform)
|
|||
|
||||
void Node::setAdditionalTransform(const Mat4& additionalTransform)
|
||||
{
|
||||
Mat4* mat4= const_cast<Mat4*>(&additionalTransform);
|
||||
setAdditionalTransform(mat4);
|
||||
setAdditionalTransform(&additionalTransform);
|
||||
}
|
||||
|
||||
AffineTransform Node::getParentToNodeAffineTransform() const
|
||||
|
|
|
@ -1643,7 +1643,7 @@ public:
|
|||
*
|
||||
* @param additionalTransform An additional transform matrix.
|
||||
*/
|
||||
void setAdditionalTransform(Mat4* additionalTransform);
|
||||
void setAdditionalTransform(const Mat4* additionalTransform);
|
||||
void setAdditionalTransform(const Mat4& additionalTransform);
|
||||
void setAdditionalTransform(const AffineTransform& additionalTransform);
|
||||
|
||||
|
|
Loading…
Reference in New Issue