Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualSik_the_hedgehog

Posted 24 December 2012 - 12:28 AM

The reasoning behind that logic is this: if a is true, then a == true returns true. If a is false then a == true returns false. So... basically it's just redundant. Doesn't hurt if you explicitly make the comparison, though, so honestly don't bother much about it.

 

EDIT: also if somebody ever tells you that the comparison makes the program slower, tell them the compiler is smart enough to optimize it. I hope you don't meet such a person, but that could happen.


#2Sik_the_hedgehog

Posted 24 December 2012 - 12:27 AM

The reasoning behind that logic is this: if a is true, then a == true returns true. If a is false then a == true returns false. So... basically it's just redundant. Doesn't hurt if you explicitly make the comparison, though, so honestly don't bother much about it.


#1Sik_the_hedgehog

Posted 24 December 2012 - 12:27 AM

The reasoning behind that logic is this: if a is true, then a == true returns true. If a is false then a == false returns false. So... basically it's just redundant. Doesn't hurt if you explicitly make the comparison, though, so honestly don't bother much about it.


PARTNERS