mirror of https://github.com/axmolengine/axmol.git
receives a `const &` instead of `const *`
If is more accurate since a `NULL` AffineTransform is not allowed. Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
This commit is contained in:
parent
57ce406bdb
commit
f4101d8b25
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
|
||||
namespace cocos2d {
|
||||
|
||||
void CGAffineToGL(const AffineTransform *t, GLfloat *m)
|
||||
void CGAffineToGL(const AffineTransform& t, GLfloat *m)
|
||||
{
|
||||
// | m[0] m[4] m[8] m[12] | | m11 m21 m31 m41 | | a c 0 tx |
|
||||
// | m[1] m[5] m[9] m[13] | | m12 m22 m32 m42 | | b d 0 ty |
|
||||
|
@ -37,8 +37,8 @@ void CGAffineToGL(const AffineTransform *t, GLfloat *m)
|
|||
|
||||
m[2] = m[3] = m[6] = m[7] = m[8] = m[9] = m[11] = m[14] = 0.0f;
|
||||
m[10] = m[15] = 1.0f;
|
||||
m[0] = t->a; m[4] = t->c; m[12] = t->tx;
|
||||
m[1] = t->b; m[5] = t->d; m[13] = t->ty;
|
||||
m[0] = t.a; m[4] = t.c; m[12] = t.tx;
|
||||
m[1] = t.b; m[5] = t.d; m[13] = t.ty;
|
||||
}
|
||||
|
||||
void GLToCGAffine(const GLfloat *m, AffineTransform *t)
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace cocos2d {
|
|||
|
||||
struct AffineTransform;
|
||||
|
||||
void CGAffineToGL(const AffineTransform *t, GLfloat *m);
|
||||
void CGAffineToGL(const AffineTransform &t, GLfloat *m);
|
||||
void GLToCGAffine(const GLfloat *m, AffineTransform *t);
|
||||
}//namespace cocos2d
|
||||
|
||||
|
|
Loading…
Reference in New Issue