Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: use stricter compile-time guidance
SnapshotSerializerDeserializer::GetName() appears to confuse static analysis such as Coverity. This changes the function structure to a sequence of if-else blocks and marks all branch conditions as constexpr. (Unfortunately, this results in a dangling 'else' keyword in the V macro.) As per a request in the PR discussion, this change does _not_ ensure that GetName<T>() can only be called for known types T and instead still returns an empty string in that case. Also use std::is_unsigned_v instead of !std::is_signed_v. PR-URL: #46509 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
- Loading branch information