Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 132f80809c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| std::size_t size = 0; | ||
| const auto type_val = static_cast<std::uint64_t>(type); | ||
| size += UintVar(type_val).size(); | ||
| const auto delta = type - prev_type; |
There was a problem hiding this comment.
Keep enum KVP size computation compilable
KeyType explicitly allows scoped enums, but KeyValuePair::Size now does arithmetic directly on T (type - prev_type, and then % on type), which is ill-formed for enum class types like ParameterType. Any code path that instantiates KeyValuePair<ParameterType>::Size(...) will fail to compile, so this regresses the template contract compared with the previous cast-to-uint64_t approach.
Useful? React with 👍 / 👎.
In Draft 16, KVPs are sorted and delta encoded on type.