Permalink
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (33 sloc) 816 Bytes

RCS1049: Simplify boolean comparison

Property Value
Id RCS1049
Category Simplification
Default Severity Info
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer

Example

Code with Diagnostic

bool f = false;

// ...

if (f == false) // RCS1049
{
}

if (f != true) // RCS1049
{
}

Code with Fix

if (!f)
{
}

if (!f)
{
}

See Also

(Generated with DotMarkdown)