CONTEXT: This function is inside a class which wraps a boolean. There is another function (really should have included that now that I think about it) that returns val. They will return the exact same thing, and the '== true' part is pointless.
Sure it's pointless, but it doesn't affect performance and at best, it highlights to the reader that val is indeed a bool, so you don't have to look elsewhere for that information. So basically, it's not so bad.
69
u/Bluebearsuper Jun 23 '20
CONTEXT: This function is inside a class which wraps a boolean. There is another function (really should have included that now that I think about it) that returns val. They will return the exact same thing, and the '== true' part is pointless.