From 00e8aca68ea5257d2fef20912428577171b640e2 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 26 Jan 2020 16:15:36 +0100 Subject: [PATCH] Improved some stuff --- src/query/command3.cpp | 2 +- src/query/command3.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/query/command3.cpp b/src/query/command3.cpp index 624d034..e297fcf 100644 --- a/src/query/command3.cpp +++ b/src/query/command3.cpp @@ -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; diff --git a/src/query/command3.h b/src/query/command3.h index 312ddea..3812cde 100644 --- a/src/query/command3.h +++ b/src/query/command3.h @@ -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 ::value || std::is_same::value), int> = 1> inline void put_unchecked(size_t index, const std::string_view& key, const T& value) { static_assert(converter::supported, "Target type isn't supported!");