I know there really won't be a big change but I'm generally curious. Which is faster one or two?
1:
if (foobool)
{
// FOOBOOL!
}
else
{
foobool = true;
}
2:
if (foobool)
{
// FOOBOOL!
}
// else
// {
foobool = true;
//}
I figure there is more going into making a if else statement than setting a bool to true. However if I don't put the else statement and the bool is already true then it would be setting it twice. But would adding the else statement would also make it slower?