Skip to content

Remove commented code #513

Closed
Closed
@dan-drews

Description

@dan-drews

While digging into the source code, I discovered a large amount of commented out code throughout the solution.

Unless there is a reason behind this that I am not aware of, I think it is best to remove this. In a worst-case scenario, we have the git history to take care of this.

One example is in UnbufferedStream.cs, the following code is all commented out:

//}
//if (checkStream == null)
//{
//    checkStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
//}
//byte[] cbuf = new byte[count];
//int checkRead = checkStream.Read(cbuf, 0, cbuf.Length);
//if (checkRead != read)
//{
//    Console.WriteLine("!!! bytes read mismatch at " + fileName + ": "  + checkStream.Position + " / " + Position + ": " +
//        "read = " + read + "; checkRead = " + checkRead);
//}
//else
//{
//    Console.WriteLine(">>> bytes read match at " + fileName + ": " + checkStream.Position + " / " + Position + ": " +
//        "read = " + read + "; checkRead = " + checkRead);
//}

I haven't yet discovered the extent of this, but I think some work should be done on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions