1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-07-15 16:14:12 +00:00

Add support for single chars to the run() method.

This commit is contained in:
King_DuckZ 2016-06-14 09:10:45 +01:00
parent 9a69b8de10
commit efd7118189
4 changed files with 42 additions and 8 deletions

View file

@ -81,11 +81,12 @@ namespace redis {
using LengthArray = std::array<std::size_t, arg_count>;
using implem::arg_to_bin_safe_char;
using implem::arg_to_bin_safe_length;
using implem::MakeCharInfo;
using boost::string_ref;
return this->run_pvt(
static_cast<int>(arg_count),
CharPointerArray{ arg_to_bin_safe_char(string_ref(parCommand)), arg_to_bin_safe_char(std::forward<Args>(parArgs))... }.data(),
CharPointerArray{ (arg_to_bin_safe_char(string_ref(parCommand))), MakeCharInfo<typename std::remove_const<typename std::remove_reference<Args>::type>::type>(std::forward<Args>(parArgs)).data()... }.data(),
LengthArray{ arg_to_bin_safe_length(string_ref(parCommand)), arg_to_bin_safe_length(std::forward<Args>(parArgs))... }.data()
);
}