0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-15 22:41:12 +01:00

ircd:Ⓜ️:sync::item: Use string_view of item name for ctor.

This commit is contained in:
Jason Volk 2023-02-04 13:13:59 -08:00
parent 86560ab273
commit c3bcb03b31
2 changed files with 10 additions and 10 deletions

View file

@ -30,7 +30,7 @@ namespace ircd::m::sync
/// and a linear handler.
///
struct ircd::m::sync::item
:instance_multimap<std::string, item, std::less<>>
:instance_multimap<string_view, item, std::less<>>
{
using handle = std::function<bool (data &)>;
@ -52,7 +52,7 @@ struct ircd::m::sync::item
bool linear(data &);
bool polylog(data &);
item(std::string name,
item(const string_view &name,
handle polylog = {},
handle linear = {},
const json::members & = {});
@ -64,4 +64,4 @@ struct ircd::m::sync::item
template<>
decltype(ircd::m::sync::item::map)
ircd::instance_multimap<std::string, ircd::m::sync::item, std::less<>>::map;
ircd::instance_multimap<ircd::string_view, ircd::m::sync::item, std::less<>>::map;

View file

@ -32,8 +32,8 @@ ircd::m::sync::pool
};
template<>
decltype(ircd::util::instance_multimap<std::string, ircd::m::sync::item, std::less<>>::map)
ircd::util::instance_multimap<std::string, ircd::m::sync::item, std::less<>>::map
decltype(ircd::m::sync::item::map)
ircd::util::instance_multimap<ircd::string_view, ircd::m::sync::item, std::less<>>::map
{};
template<>
@ -195,13 +195,13 @@ ircd::m::sync::stats::info
// item::item
//
ircd::m::sync::item::item(std::string name,
ircd::m::sync::item::item(const string_view &name,
handle polylog,
handle linear,
const json::members &feature)
:instance_multimap
{
std::move(name)
name
}
,conf_name
{