masaori335 commented on a change in pull request #7606:
URL: https://github.com/apache/trafficserver/pull/7606#discussion_r598449638
##########
File path: proxy/logging/LogField.cc
##########
@@ -290,9 +291,8 @@ int
LogField::milestones_from_m_name(TSMilestonesType *ms1, TSMilestonesType *ms2)
{
milestone_map::iterator it;
- ts::ConstBuffer ms1_name, ms2_name(m_name, strlen(m_name));
-
- ms1_name = ms2_name.splitOn('-');
+ ts::TextView ms2_name(m_name, strlen(m_name));
+ std::string_view ms1_name = ms2_name.split_prefix_at('-');
Review comment:
note: `ConstBuffer::splitOn(char const *p)` vs
`TextView::split_prefix_at(char c)`
https://github.com/apache/trafficserver/blob/42db8bb284d63e3f019e2d9d986e4d34f750f69a/include/tscore/TsBuffer.h#L461-L472
https://github.com/apache/trafficserver/blob/42db8bb284d63e3f019e2d9d986e4d34f750f69a/include/tscpp/util/TextView.h#L834-L838
https://github.com/apache/trafficserver/blob/42db8bb284d63e3f019e2d9d986e4d34f750f69a/include/tscpp/util/TextView.h#L817-L826
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]