From 4b7ebb3cf05cb8c35f1ff7ed690598957bb54a2c Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 28 Jul 2020 01:24:27 -0700 Subject: [PATCH] ircd::db: Elide std::function wrapping for equal comparator (related 6c2736f592). --- include/ircd/db/comparator.h | 2 +- matrix/dbs_event_refs.cc | 2 +- matrix/dbs_event_state.cc | 2 +- matrix/dbs_room_events.cc | 2 +- matrix/dbs_room_state_space.cc | 2 +- matrix/dbs_room_type.cc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ircd/db/comparator.h b/include/ircd/db/comparator.h index e61136cd1..311c94b31 100644 --- a/include/ircd/db/comparator.h +++ b/include/ircd/db/comparator.h @@ -37,7 +37,7 @@ struct ircd::db::comparator string_view name; less_function *less {nullptr}; - std::function equal; + equal_function *equal {nullptr}; std::function separator; std::function successor; bool hashable {true}; diff --git a/matrix/dbs_event_refs.cc b/matrix/dbs_event_refs.cc index f365e6bae..87134a221 100644 --- a/matrix/dbs_event_refs.cc +++ b/matrix/dbs_event_refs.cc @@ -87,7 +87,7 @@ ircd::m::dbs::desc::event_refs__cmp { "_event_refs", event_refs__cmp_less, - std::equal_to{}, + db::cmp_string_view::equal, }; const ircd::db::descriptor diff --git a/matrix/dbs_event_state.cc b/matrix/dbs_event_state.cc index 74b148ea7..465813bd3 100644 --- a/matrix/dbs_event_state.cc +++ b/matrix/dbs_event_state.cc @@ -61,7 +61,7 @@ ircd::m::dbs::desc::event_state__cmp { "_event_state", event_state__cmp_lt, - std::equal_to{}, + db::cmp_string_view::equal, }; const ircd::db::descriptor diff --git a/matrix/dbs_room_events.cc b/matrix/dbs_room_events.cc index ab6cc12b3..f5c3304d0 100644 --- a/matrix/dbs_room_events.cc +++ b/matrix/dbs_room_events.cc @@ -86,7 +86,7 @@ ircd::m::dbs::desc::room_events__cmp { "_room_events", room_events__cmp_lt, - std::equal_to{}, + db::cmp_string_view::equal, }; /// This column stores events in sequence in a room. Consider the following: diff --git a/matrix/dbs_room_state_space.cc b/matrix/dbs_room_state_space.cc index 9117c3ea6..44539893d 100644 --- a/matrix/dbs_room_state_space.cc +++ b/matrix/dbs_room_state_space.cc @@ -68,7 +68,7 @@ ircd::m::dbs::desc::room_state_space__cmp { "_room_state_space", room_state_space__cmp_lt, - std::equal_to{}, + db::cmp_string_view::equal, }; const ircd::db::prefix_transform diff --git a/matrix/dbs_room_type.cc b/matrix/dbs_room_type.cc index d11bf5222..309be76ea 100644 --- a/matrix/dbs_room_type.cc +++ b/matrix/dbs_room_type.cc @@ -85,7 +85,7 @@ ircd::m::dbs::desc::room_type__cmp { "_room_type", room_type__cmp_lt, - std::equal_to{}, + db::cmp_string_view::equal, }; /// This column stores events by type in sequence in a room. Consider the