This change only be active for risc-v 64 target.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
How about merge the two HasListItem into one to minimize redundancy ?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
How about merge the two HasListItem into one to minimize redundancy ?
I also considered merging the two functions into one, but since isspace() checks for more than just the space character—it includes other whitespace characters like tabs, newlines, etc. Combining them would make the function less readable. I think it's better to keep them separate.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Zhijin ZengHow about merge the two HasListItem into one to minimize redundancy ?
I also considered merging the two functions into one, but since isspace() checks for more than just the space character—it includes other whitespace characters like tabs, newlines, etc. Combining them would make the function less readable. I think it's better to keep them separate.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Zhijin ZengHow about merge the two HasListItem into one to minimize redundancy ?
Anton BikineevI also considered merging the two functions into one, but since isspace() checks for more than just the space character—it includes other whitespace characters like tabs, newlines, etc. Combining them would make the function less readable. I think it's better to keep them separate.
You could add a predicate as a template argument.
| 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. |
Hi Clemens
Could you have time to review this CL?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
return HasListItem(list, item, [](const char c) { return isspace(c); });You can replace this lambda by just the "isspace" function, which will be passed as a function pointer.
[separator](const char c) { return c == separator; });Optional: If you want to go fancy, this lambda can be replaced by `std::bind_front(std::equal_to{}, separator)`.
And since this is only called twice (right after each other), I would consider making this a local helper, defined right before the two uses. Something like:
auto HasFeature = [features](const char* feature) {
return HasListItem(features, feature, std::bind_front(std::equal_to{}, '_'));
};| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi Clemens
Could you have time to review this CL?
Done
return HasListItem(list, item, [](const char c) { return isspace(c); });You can replace this lambda by just the "isspace" function, which will be passed as a function pointer.
Done
[separator](const char c) { return c == separator; });Optional: If you want to go fancy, this lambda can be replaced by `std::bind_front(std::equal_to{}, separator)`.
And since this is only called twice (right after each other), I would consider making this a local helper, defined right before the two uses. Something like:
auto HasFeature = [features](const char* feature) {
return HasListItem(features, feature, std::bind_front(std::equal_to{}, '_'));
};
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |