Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: use stricter compile-time guidance #46509

Merged

Commits on Mar 29, 2023

  1. 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.
    tniessen committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    8ddfb52 View commit details
    Browse the repository at this point in the history