Skip to content
Myr

Break a for loop into two parts and get an if out of the loop.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Carmelo Fernandez Aguera · committed by Carmelo Fernandez Aguera · parent e6afb9c · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:stb_image.h+5 added-1 removed
1621 unmodified lines
1622 for (i=0; i < x*y; ++i) {1623 for (k=0; k < n; ++k) {1624 output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale);1625 }1626 if (k < comp) output[i*comp + k] = data[i*comp+k]/255.0f;1626 }1627 if (n < comp) {1628 for (i=0; i < x*y; ++i) {1629 output[i*comp + n] = data[i*comp + n]/255.0f;1630 }1631 }1632 STBI_FREE(data);1633 return output;1634}1635#endif
5831 unmodified lines