codeformatter icon indicating copy to clipboard operation
codeformatter copied to clipboard

CodeFormatter should remove redundant field initializers

Open bartonjs opened this issue 10 years ago • 1 comments

public class CryptoStream
{
    private int _InputBufferIndex = 0;
}

_InputBufferIndex will already have the value 0, the initializer being there doesn't change anything.

bartonjs avatar May 14 '15 21:05 bartonjs

Ehh, no - if it's a hot perf path, that's one thing but I don't believe people who choose to be explict so the code reads "I didn't forget to initialize this, I made an explicit decision to initialize it to this value" should be scolded by a code-style tool.

ghost avatar Apr 21 '16 17:04 ghost