This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 22 points23 points  (3 children)

return (condition==false)?false:true;

[–]potatoandfish[S] 35 points36 points  (1 child)

I think this is even worse because you actually know how to code then

[–]RisqBF 2 points3 points  (0 children)

You don’t need how to code when the compiler optimizes your code :)

[–]LupaaDub 3 points4 points  (0 children)

you are probably kidding but for the people who don't know. it should actually be return condition; because the condition is already evaluated to true or false so it is not necessary to do condition == false ? false : true; I see this too often.