| 873 | } |
| 874 | |
| 875 | int |
| 876 | SessionProtocolNameRegistry::indexFor(TextView name) const |
| 877 | { |
| 878 | const swoc::TextView *end = m_names.begin() + m_n; |
| 879 | auto spot = std::find(m_names.begin(), end, name); |
| 880 | if (spot != end) { |
| 881 | return static_cast<int>(spot - m_names.begin()); |
| 882 | } |
| 883 | return INVALID; |
| 884 | } |
| 885 | |
| 886 | swoc::TextView |
| 887 | SessionProtocolNameRegistry::nameFor(int idx) const |
no test coverage detected