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

ircd:Ⓜ️:v1: Remove non-opts overloads; workaround g++-7 compiler bug.

This commit is contained in:
Jason Volk 2019-02-25 13:02:03 -08:00
parent e7d9350b80
commit 11766b3e04
11 changed files with 20 additions and 97 deletions

View file

@ -27,7 +27,6 @@ struct ircd::m::v1::backfill
}
backfill(const room::id &, const mutable_buffer &, opts);
backfill(const room::id &, const mutable_buffer &);
backfill() = default;
};

View file

@ -34,7 +34,6 @@ struct ircd::m::v1::event
}
event(const m::event::id &, const mutable_buffer &, opts);
event(const m::event::id &, const mutable_buffer &);
event() = default;
};

View file

@ -28,7 +28,6 @@ struct ircd::m::v1::event_auth
}
event_auth(const m::room::id &, const m::event::id &, const mutable_buffer &, opts);
event_auth(const m::room::id &, const m::event::id &, const mutable_buffer &);
event_auth() = default;
};

View file

@ -27,7 +27,6 @@ struct ircd::m::v1::make_join
}
make_join(const room::id &, const id::user &, const mutable_buffer &, opts);
make_join(const room::id &, const id::user &, const mutable_buffer &);
make_join() = default;
};

View file

@ -27,7 +27,6 @@ struct ircd::m::v1::public_rooms
}
public_rooms(const net::hostport &, const mutable_buffer &, opts);
public_rooms(const net::hostport &, const mutable_buffer &);
public_rooms() = default;
};

View file

@ -55,14 +55,11 @@ struct ircd::m::v1::query::profile
:query
{
profile(const id::user &user_id, const string_view &field, const mutable_buffer &, opts);
profile(const id::user &user_id, const string_view &field, const mutable_buffer &);
profile(const id::user &user_id, const mutable_buffer &, opts);
profile(const id::user &user_id, const mutable_buffer &);
};
struct ircd::m::v1::query::directory
:query
{
directory(const id::room_alias &room_alias, const mutable_buffer &, opts);
directory(const id::room_alias &room_alias, const mutable_buffer &);
};

View file

@ -27,7 +27,6 @@ struct ircd::m::v1::state
}
state(const room::id &, const mutable_buffer &, opts);
state(const room::id &, const mutable_buffer &);
state() = default;
};

View file

@ -142,15 +142,6 @@ ircd::m::v1::send::send(const string_view &txnid,
// v1/public_rooms.h
//
ircd::m::v1::public_rooms::public_rooms(const net::hostport &remote,
const mutable_buffer &buf)
:public_rooms
{
remote, buf, opts{}
}
{
}
ircd::m::v1::public_rooms::public_rooms(const net::hostport &remote,
const mutable_buffer &buf,
opts opts)
@ -323,15 +314,6 @@ ircd::m::v1::frontfill::make_content(const mutable_buffer &buf,
// v1/backfill.h
//
ircd::m::v1::backfill::backfill(const room::id &room_id,
const mutable_buffer &buf)
:backfill
{
room_id, buf, opts{}
}
{
}
ircd::m::v1::backfill::backfill(const room::id &room_id,
const mutable_buffer &buf,
opts opts)
@ -395,15 +377,6 @@ ircd::m::v1::backfill::backfill(const room::id &room_id,
// v1/state.h
//
ircd::m::v1::state::state(const room::id &room_id,
const mutable_buffer &buf)
:state
{
room_id, buf, opts{}
}
{
}
ircd::m::v1::state::state(const room::id &room_id,
const mutable_buffer &buf,
opts opts)
@ -527,16 +500,6 @@ ircd::m::v1::query_auth::query_auth(const m::room::id &room_id,
// v1/event_auth.h
//
ircd::m::v1::event_auth::event_auth(const m::room::id &room_id,
const m::event::id &event_id,
const mutable_buffer &buf)
:event_auth
{
room_id, event_id, buf, opts{}
}
{
}
ircd::m::v1::event_auth::event_auth(const m::room::id &room_id,
const m::event::id &event_id,
const mutable_buffer &buf,
@ -593,15 +556,6 @@ ircd::m::v1::event_auth::event_auth(const m::room::id &room_id,
// v1/event.h
//
ircd::m::v1::event::event(const m::event::id &event_id,
const mutable_buffer &buf)
:event
{
event_id, buf, opts{}
}
{
}
ircd::m::v1::event::event(const m::event::id &event_id,
const mutable_buffer &buf,
opts opts)
@ -768,16 +722,6 @@ ircd::m::v1::send_join::send_join(const room::id &room_id,
// v1/make_join.h
//
ircd::m::v1::make_join::make_join(const room::id &room_id,
const id::user &user_id,
const mutable_buffer &buf)
:make_join
{
room_id, user_id, buf, opts{}
}
{
}
ircd::m::v1::make_join::make_join(const room::id &room_id,
const id::user &user_id,
const mutable_buffer &buf,
@ -1226,15 +1170,6 @@ namespace ircd::m::v1
thread_local char query_url_buf[1024];
}
ircd::m::v1::query::directory::directory(const id::room_alias &room_alias,
const mutable_buffer &buf)
:directory
{
room_alias, buf, opts{room_alias.host()}
}
{
}
ircd::m::v1::query::directory::directory(const id::room_alias &room_alias,
const mutable_buffer &buf,
opts opts)
@ -1251,15 +1186,6 @@ ircd::m::v1::query::directory::directory(const id::room_alias &room_alias,
{
}
ircd::m::v1::query::profile::profile(const id::user &user_id,
const mutable_buffer &buf)
:profile
{
user_id, buf, opts{user_id.host()}
}
{
}
ircd::m::v1::query::profile::profile(const id::user &user_id,
const mutable_buffer &buf,
opts opts)
@ -1276,16 +1202,6 @@ ircd::m::v1::query::profile::profile(const id::user &user_id,
{
}
ircd::m::v1::query::profile::profile(const id::user &user_id,
const string_view &field,
const mutable_buffer &buf)
:profile
{
user_id, field, buf, opts{user_id.host()}
}
{
}
ircd::m::v1::query::profile::profile(const id::user &user_id,
const string_view &field,
const mutable_buffer &buf,

View file

@ -231,7 +231,10 @@ room_alias_fetch(const mutable_buffer &out,
{
m::v1::query::directory federation_request
{
alias, out
alias, out, m::v1::query::opts
{
alias.host()
}
};
if(!federation_request.wait(seconds(room_alias_fetch_timeout), std::nothrow))

View file

@ -252,7 +252,10 @@ get__profile_remote(client &client,
m::v1::query::profile federation_request
{
user.user_id, param, buf
user.user_id, param, buf, m::v1::query::opts
{
user.user_id.host()
}
};
//TODO: conf

View file

@ -151,9 +151,14 @@ bootstrap(const string_view &host,
16_KiB
};
m::v1::make_join::opts mjopts
{
net::hostport{host}
};
m::v1::make_join request
{
room_id, user_id, buf, { host }
room_id, user_id, buf, std::move(mjopts)
};
request.wait(seconds(make_join_timeout));
@ -271,9 +276,14 @@ bootstrap(const string_view &host,
16_KiB
};
m::v1::send_join::opts sjopts
{
net::hostport{host}
};
m::v1::send_join sj
{
room_id, event_id, strung, buf2, { host }
room_id, event_id, strung, buf2, std::move(sjopts)
};
sj.wait(seconds(send_join_timeout));