C
Chris Forone
does the std::move() assignement make sense here or is it used only in
ctors?
void Matrix::Ortho(GLfloat right, GLfloat top, GLfloat near, GLfloat far)
{
std::array<GLfloat, 16> temp =
{
1.0f / right, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f / top, 0.0f, 0.0f,
0.0f, 0.0f, -2.0f / (far - near), 0.0f,
0.0f, 0.0f, -(far + near) / (far - near), 1.0f
};
matrix = std::move(temp); // matrix = private class member
}
thanks
cheers, chris
ctors?
void Matrix::Ortho(GLfloat right, GLfloat top, GLfloat near, GLfloat far)
{
std::array<GLfloat, 16> temp =
{
1.0f / right, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f / top, 0.0f, 0.0f,
0.0f, 0.0f, -2.0f / (far - near), 0.0f,
0.0f, 0.0f, -(far + near) / (far - near), 1.0f
};
matrix = std::move(temp); // matrix = private class member
}
thanks
cheers, chris