clang-tidy: Disable readability-container-data-pointer#1047
Conversation
It may be intentional to do `&v[0]` instead of `v.data()` as a way of saying "give me the address of the 0th element" instead of "give me the address of the array of elements". An example: #1046.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1047 +/- ##
=======================================
Coverage 94.21% 94.21%
=======================================
Files 153 153
Lines 15934 15934
=======================================
Hits 15012 15012
Misses 922 922
Flags with carried forward coverage won't be shown. Click here to find out more. |
do you mean just for readability, they are always equal in practice? (at least for non-empty containers) |
Yea, readability. |
2 similar comments
Yea, readability. |
Yea, readability. |
It may be intentional to do
&v[0]instead ofv.data()as a way of saying "give me the address of the 0th element" instead of "give me the address of the array of elements".An example: #1046.