Remove unneeded casts#734
Conversation
These casts are redundant
|
I do not know if the changes here will compile when my PR #732 gets merged (with ARM and ARM64 targets for zlib for Windows, Linux, and MacOS (except ARM and x86 for Mac)) |
|
After thinking about this, I think the casts are actually needed as it could change how the code actually works and could produce bugs later that breaks the entire thing, when I tried a change similar to this with my 100% .NET implementation of zlib (without the use of the native library) I noticed that then I accidentally broke it to where the zlib header and footers are good and created, but then it broke it to where it basically just copies the original data to the resulting "compressed data" buffer without actually compressing it, despite the zlib header and footer saying that it is compressed. |
|
The commit is not all cast changes. In any case, I see no point in making any of these changes. Code is not just for the compiler. If it were, we could just obfuscate it all. Code is also literature, a communication from one human to another. A "redundant" cast may be entirely intended as a signal of intent. |
These casts are redundant