Commit ccbf9bb6 authored by Matthieu Dorier's avatar Matthieu Dorier

fixed std::min

parent 5fcbf1d2
......@@ -1622,7 +1622,7 @@ static void sdskv_list_keys_ult(hg_handle_t handle)
ds_bulk_t start_kdata(in.start_key.data, in.start_key.data+in.start_key.size);
ds_bulk_t prefix(in.prefix.data, in.prefix.data+in.prefix.size);
auto keys = db->list_keys(start_kdata, in.max_keys, prefix);
hg_size_t num_keys = std::min(keys.size(), in.max_keys);
hg_size_t num_keys = std::min((size_t)keys.size(), (size_t)in.max_keys);
if(num_keys == 0) throw SDSKV_SUCCESS;
......@@ -1807,7 +1807,7 @@ static void sdskv_list_keyvals_ult(hg_handle_t handle)
ds_bulk_t start_kdata(in.start_key.data, in.start_key.data+in.start_key.size);
ds_bulk_t prefix(in.prefix.data, in.prefix.data+in.prefix.size);
auto keyvals = db->list_keyvals(start_kdata, in.max_keys, prefix);
hg_size_t num_keys = std::min(keyvals.size(), in.max_keys);
hg_size_t num_keys = std::min((size_t)keyvals.size(), (size_t)in.max_keys);
out.nkeys = num_keys;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment