Improved some stuff
This commit is contained in:
parent
3d3ddd274e
commit
00e8aca68e
|
@ -31,7 +31,7 @@ bool command_parser::parse(bool command) {
|
|||
if(findex == std::string::npos)
|
||||
findex = this->_command.size();
|
||||
|
||||
auto& bulk = this->_bulks.emplace_back(this->_bulks.size() - 1, this->data.substr(index, findex - index));
|
||||
this->_bulks.emplace_back(this->_bulks.size() - 1, this->data.substr(index, findex - index));
|
||||
index = findex + 1;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -198,6 +198,10 @@ namespace ts {
|
|||
this->impl_put_unchecked(this->bulks[index], index, key, value);
|
||||
}
|
||||
|
||||
inline void put_unchecked(size_t index, const std::string_view& key, const std::string& value) {
|
||||
this->put_unchecked(index, key, std::string_view{value});
|
||||
}
|
||||
|
||||
template <typename T, std::enable_if_t<!(std::is_same<T, std::string_view>::value || std::is_same<T, std::string>::value), int> = 1>
|
||||
inline void put_unchecked(size_t index, const std::string_view& key, const T& value) {
|
||||
static_assert(converter<T>::supported, "Target type isn't supported!");
|
||||
|
|
Loading…
Reference in New Issue