mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-29 16:28:08 +00:00
test: Drop the stale entry-count note from newestSupportedProtocolVersion
Addresses a Copilot review nit on PR 8246: the comment's first two sentences already explain why max_element is used over reading the last entry. The trailing entry count added nothing to that and would go stale the moment a third protocol version is added.
This commit is contained in:
@@ -156,7 +156,7 @@ newestSupportedProtocolVersion()
|
||||
{
|
||||
// The list above is sorted, so this could read its last entry instead. It
|
||||
// scans for the maximum so that it stays correct on its own, rather than on
|
||||
// an invariant a separate static_assert keeps. The list holds two entries.
|
||||
// an invariant a separate static_assert keeps.
|
||||
return *std::ranges::max_element(kSupportedProtocolList);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user