[uri-path] remove UriEnumCheck checking order of Uri enum values. - #12179
Conversation
This commit removes the build-time check for the order of the `Uri` enum values. This check is now redundant as the `static_assert` calls added in openthread#12017 use `AreConstStringsEqual()` to validate the correctness of the `kEntries` array, ensuring that each URI path is correctly associated with its corresponding enum value.
Library files
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request removes the UriEnumCheck struct, which performed a compile-time validation to ensure that the Uri enum values are sequential. As explained in the description, this check is redundant because static_assert calls already validate the kEntries array, ensuring each URI path is correctly associated with its enum value. My review confirms that this change is a safe and reasonable code cleanup, as the C++ standard guarantees sequential values for this enum declaration, and the existing static assertions provide sufficient compile-time verification.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12179 +/- ##
==========================================
+ Coverage 73.83% 74.20% +0.36%
==========================================
Files 673 671 -2
Lines 92159 94526 +2367
==========================================
+ Hits 68049 70139 +2090
- Misses 24110 24387 +277
🚀 New features to boost your workflow:
|
This commit removes the build-time check for the order of the
Urienum values. This check is now redundant as thestatic_assertcalls added in #12017 useAreConstStringsEqual()to validate the correctness of thekEntriesarray, ensuring that each URI path is correctly associated with its corresponding enum value.