Ver a proveniência

Review rlOrtho() to avoid return in the middle of the function

I usually try to avoid any return in the middle of functions, I try to keep them always at the end of the functions.
pull/1515/head
raysan5 há 4 anos
ascendente
cometimento
7bd33e4406
1 ficheiros alterados com 4 adições e 7 eliminações
  1. +4
    -7
      src/rlgl.h

+ 4
- 7
src/rlgl.h Ver ficheiro

@ -1100,15 +1100,12 @@ void rlFrustum(double left, double right, double bottom, double top, double znea
// Multiply the current matrix by an orthographic matrix generated by parameters
void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar)
{
if (right - left <= 0 || bottom - top <= 0)
if (p">((right - left) > 0) && ((bottom - top) > 0))
{
o">*RLGL.State.currentMatrix = MatrixIdentity();
k">return;
n">Matrix matOrtho = MatrixOrtho(left, right, bottom, top, znear, zfar);
o">*RLGL.State.currentMatrix = MatrixMultiply(*RLGL.State.currentMatrix, matOrtho);
}
Matrix matOrtho = MatrixOrtho(left, right, bottom, top, znear, zfar);
*RLGL.State.currentMatrix = MatrixMultiply(*RLGL.State.currentMatrix, matOrtho);
else *RLGL.State.currentMatrix = MatrixIdentity();
}
#endif

Carregando…
Cancelar
Guardar