Kylin/HttpProxy/TemplateMatchs.cpp

13 lines
442 B
C++
Raw Normal View History

2023-07-21 15:28:59 +08:00
#include "TemplateMatchs.h"
2023-12-30 00:03:40 +08:00
TemplateMatchStorageBase::const_reference TemplateMatchStorageBase::at(boost::core::string_view id) const {
2023-07-21 15:28:59 +08:00
for (std::size_t i = 0; i < size(); ++i) {
if (ids()[i] == id) return matches()[i];
}
boost::throw_exception(std::out_of_range(""));
}
2023-12-30 00:03:40 +08:00
TemplateMatchStorageBase::const_reference TemplateMatchStorageBase::operator[](boost::core::string_view id) const {
2023-07-21 15:28:59 +08:00
return at(id);
}