Is this better then creating the seperate bool?

image

You’re calling the function twice. If you remove the one inside the loop then it should be the same. Compilers can optimise away variables in simple cases like this.

1 Like

Privacy & Terms