Avoid const_cast when calling Node::setAdditionalTransform

This commit is contained in:
mogemimi 2016-06-27 19:33:45 +09:00
parent d7cb7676bc
commit 2a853ba73e
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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);