+1

[C109] Misleading text for BooleanValue = False

Uwe Schuster 10 years ago updated by Nicholas Ring 10 years ago 1

New in FixInsight 2015.11 in contrast to 2015.10 is C109 for "BooleanValue = False" like in the following function:


function TestC109False(AValue: Boolean): Boolean;
begin
  Result := AValue = False;
end;
This comparison is not unnecessary, because when removing "= False" one will get the opposite result. However the style is bad and for now a different text for the "= False" case, that suggests using "not", would be sufficient.

I would suggest that it to be extended to any comparison to any explicit boolean comparison, be it equals, doesn't equal, etc..