diff --git a/include/ircd/m/state.h b/include/ircd/m/state.h index 8cfbaf5f9..427ee045f 100644 --- a/include/ircd/m/state.h +++ b/include/ircd/m/state.h @@ -38,6 +38,7 @@ namespace ircd::m::state constexpr int8_t MAX_HEIGHT { 16 }; // good for few mil at any degree :) using id_closure = std::function; + using val_closure = std::function; using node_closure = std::function; using search_closure = std::function; using iter_closure = std::function; @@ -66,9 +67,9 @@ namespace ircd::m::state size_t count(const string_view &head, const iter_bool_closure &); size_t count(const string_view &head); - void get(const string_view &head, const json::array &key, const id_closure &); - void get(const string_view &head, const string_view &type, const string_view &state_key, const id_closure &); - void get__room(const id::room &, const string_view &type, const string_view &state_key, const id_closure &); + void get(const string_view &head, const json::array &key, const val_closure &); + void get(const string_view &head, const string_view &type, const string_view &state_key, const val_closure &); + void get__room(const id::room &, const string_view &type, const string_view &state_key, const val_closure &); } /// JSON property name strings specifically for use in m::state diff --git a/ircd/m/state.cc b/ircd/m/state.cc index e2adc022a..c14440c19 100644 --- a/ircd/m/state.cc +++ b/ircd/m/state.cc @@ -38,7 +38,7 @@ void ircd::m::state::get__room(const id::room &room_id, const string_view &type, const string_view &state_key, - const id_closure &closure) + const val_closure &closure) { char head[ID_MAX_SZ]; return get(get_head(head, room_id), type, state_key, closure); @@ -49,7 +49,7 @@ void ircd::m::state::get(const string_view &head, const string_view &type, const string_view &state_key, - const id_closure &closure) + const val_closure &closure) { char key[KEY_MAX_SZ]; return get(head, make_key(key, type, state_key), closure); @@ -62,7 +62,7 @@ ircd::m::state::get(const string_view &head, void ircd::m::state::get(const string_view &head, const json::array &key, - const id_closure &closure) + const val_closure &closure) { char nextbuf[ID_MAX_SZ]; string_view nextid{head};