| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
uint32_t keys_len = keys->ulength().value();q: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?
int lines_end_len = static_cast<int>(line_ends->ulength().value());Why not uint32_t here too? And addtl a `DCHECK_GT(lines_end_len, 0)` for the subtractions below.
return values->ulength().value() - 2;DCHECK_GE(.., 2)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
uint32_t keys_len = keys->ulength().value();q: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?
The idea would be to keep `SafeHeapObjectSize` (renamed to something more generic) at least until implicit casts warnings can be enabled on the codebase. This way all callsites have to be more explicit when handling lengths by calling `.value()`. Of course, you could also end up writing `int something = length().value()` but it should hopefully be less likely.
int lines_end_len = static_cast<int>(line_ends->ulength().value());Why not uint32_t here too? And addtl a `DCHECK_GT(lines_end_len, 0)` for the subtractions below.
Done
return values->ulength().value() - 2;Arash KazemiDCHECK_GE(.., 2)
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
uint32_t keys_len = keys->ulength().value();Arash Kazemiq: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?
The idea would be to keep `SafeHeapObjectSize` (renamed to something more generic) at least until implicit casts warnings can be enabled on the codebase. This way all callsites have to be more explicit when handling lengths by calling `.value()`. Of course, you could also end up writing `int something = length().value()` but it should hopefully be less likely.
I see.
Of course, you could also end up writing int something = length().value() but it should hopefully be less likely.
Yeah exactly; I hope we're going in the right direction here wrt preventing mistakes vs. readable/simple code. Personally I'd much rather work with plain uint32_t.
return Just(GetSmiValue(line_ends, lines_end_len - 1));nit: There's one more here.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
nit: There's one more here.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |