Don’t do this:

if (b)
  return true;
else
  return false;

Do this:

return b;

Why? It is shorter and easier to read.

Next - Previous