Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unnecessary assigning to new variables #305

Closed
ShiCheng-Lu opened this issue Dec 20, 2021 · 1 comment
Closed

unnecessary assigning to new variables #305

ShiCheng-Lu opened this issue Dec 20, 2021 · 1 comment

Comments

@ShiCheng-Lu
Copy link

double nm00 = rm00;

double nm00 = rm00;
double nm01 = rm01;
double nm02 = rm02;
double nm10 = rm10;
double nm11 = rm11;
double nm12 = rm12;
// set non-dependent values directly
dest._m20(rm20)
._m21(rm21)
._m22(rm22)
// set other values
._m00(nm00)
._m01(nm01)
._m02(nm02)
._m03(0.0)
._m10(nm10)
._m11(nm11)
._m12(nm12)
._m13(0.0)
._m30(m30)
._m31(m31)
._m32(m32)
._m33(m33)

assigning from rm** to nm** is completely unnecessary, unless I'm missing something, wouldn't this be fine

// set non-dependent values directly
dest._m20(rm20)
._m21(rm21)
._m22(rm22)
// set other values
._m00(rm00)
._m01(rm01)
._m02(rm02)
._m03(0.0)
._m10(rm10)
._m11(rm11)
._m12(rm12)
._m13(0.0)
._m30(m30)
._m31(m31)
._m32(m32)
._m33(m33)
httpdigest added a commit that referenced this issue Dec 20, 2021
@httpdigest httpdigest added this to the 1.10.4 release milestone Dec 20, 2021
@httpdigest
Copy link
Member

Thanks! You're right. Those variables were unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants