Closed janisozaur closed 5 years ago
I don't like memsetting structs you propose in the PR, since this assumes NONE enums are always 0, which is true right now but may change in the future. However, the good find here is that the affected structs were missing default constructors, so thanks for contributing. I've added these internally.
Also, we should not be modifying external dependency's source code, as such changes would be overwritten when we update the dependency to newer version.
The same problem is being "fixed" in https://github.com/GPUOpen-LibrariesAndSDKs/Anvil/pull/144/
Since GCC 8 compiles and GCC 8 hates memsets (?does it in order to have a more aggressive optimization?) we can say that these were the lasts memsets in the repo
Rather than trying to cheat compiler into forcefully zeroing memory, like https://github.com/GPUOpen-LibrariesAndSDKs/Anvil/pull/128 tries to do, properly zero-initialise the relevant objects.
Fixes #125 Closes #128