From ce7bb21ea444e2139ff5229dd721da2b12c6fede Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 24 Jun 2019 01:25:53 -0600 Subject: [PATCH] modules: Disambiguations for clang. --- modules/client/account/account.cc | 2 +- modules/client/account/deactivate.cc | 2 +- modules/client/register.cc | 4 ++-- modules/client/rooms/rooms.cc | 12 ++++++------ modules/m_device.cc | 4 ++-- modules/m_user.cc | 4 ++-- modules/media/media.cc | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/client/account/account.cc b/modules/client/account/account.cc index 4e133f6e9..be28a477f 100644 --- a/modules/client/account/account.cc +++ b/modules/client/account/account.cc @@ -39,7 +39,7 @@ activate__user(const m::user &user) user }; - return send(user_room, m::me.user_id, "ircd.account", "active", + return send(user_room, m::me.user_id, "ircd.account", "active", json::members { { "value", true } }); diff --git a/modules/client/account/deactivate.cc b/modules/client/account/deactivate.cc index 7bcc8c6cd..4173764c7 100644 --- a/modules/client/account/deactivate.cc +++ b/modules/client/account/deactivate.cc @@ -69,7 +69,7 @@ deactivate__user(const m::user &user, user }; - return send(user_room, m::me.user_id, "ircd.account", "active", + return send(user_room, m::me.user_id, "ircd.account", "active", json::members { { "value", false } }); diff --git a/modules/client/register.cc b/modules/client/register.cc index c829e9e2b..7856d6252 100644 --- a/modules/client/register.cc +++ b/modules/client/register.cc @@ -297,7 +297,7 @@ register_user(const m::registar &request, // Store the options from registration. m::user::room user_room{user}; - send(user_room, user.user_id, "ircd.account.options", "registration", + send(user_room, user.user_id, "ircd.account.options", "registration", json::members { { "bind_email", bind_email }, }); @@ -327,7 +327,7 @@ register_user(const m::registar &request, const m::event::id::buf access_token_id { - m::send(m::user::tokens, user_id, "ircd.access_token", access_token, + m::send(m::user::tokens, user_id, "ircd.access_token", access_token, json::members { { "ip", last_seen_ip }, { "device_id", device_id }, diff --git a/modules/client/rooms/rooms.cc b/modules/client/rooms/rooms.cc index 7d2a2ee59..45e4e04cf 100644 --- a/modules/client/rooms/rooms.cc +++ b/modules/client/rooms/rooms.cc @@ -34,7 +34,7 @@ get_rooms(client &client, const resource::request &request) { if(request.parv.size() < 2) - throw NEED_MORE_PARAMS + throw m::NEED_MORE_PARAMS { "/rooms command required" }; @@ -70,7 +70,7 @@ get_rooms(client &client, if(cmd == "initialSync") return get__initialsync(client, request, room_id); - throw NOT_FOUND + throw m::NOT_FOUND { "/rooms command not found" }; @@ -87,7 +87,7 @@ put_rooms(client &client, const resource::request &request) { if(request.parv.size() < 2) - throw NEED_MORE_PARAMS + throw m::NEED_MORE_PARAMS { "/rooms command required" }; @@ -114,7 +114,7 @@ put_rooms(client &client, if(cmd == "redact") return put__redact(client, request, room_id); - throw NOT_FOUND + throw m::NOT_FOUND { "/rooms command not found" }; @@ -134,7 +134,7 @@ post_rooms(client &client, const resource::request &request) { if(request.parv.size() < 2) - throw NEED_MORE_PARAMS + throw m::NEED_MORE_PARAMS { "/rooms command required" }; @@ -182,7 +182,7 @@ post_rooms(client &client, if(cmd == "report") return post__report(client, request, room_id); - throw NOT_FOUND + throw m::NOT_FOUND { "/rooms command not found" }; diff --git a/modules/m_device.cc b/modules/m_device.cc index a2063cb5c..dd5af39c2 100644 --- a/modules/m_device.cc +++ b/modules/m_device.cc @@ -43,7 +43,7 @@ ircd::m::device::set(const m::user &user, buf, "ircd.device.%s", prop }}; - m::send(user_room, user, type, device_id, + m::send(user_room, user, type, device_id, json::members { { "", val } }); @@ -66,7 +66,7 @@ ircd::m::device::set(const m::user &user, }}; const user::room user_room{user}; - m::send(user_room, user, type, id, + m::send(user_room, user, type, id, json::members { { "", val } }); diff --git a/modules/m_user.cc b/modules/m_user.cc index c4d8e5011..3d899355f 100644 --- a/modules/m_user.cc +++ b/modules/m_user.cc @@ -95,14 +95,14 @@ highlighted_count__between(const user &user, it.seek_idx(a); if(!it && !exists(room)) - throw NOT_FOUND + throw m::NOT_FOUND { "Cannot find room '%s' to count highlights for '%s'", string_view{room.room_id}, string_view{user.user_id} }; else if(!it) - throw NOT_FOUND + throw m::NOT_FOUND { "Event @ idx:%lu or idx:%lu not found in '%s' to count highlights for '%s'", a, diff --git a/modules/media/media.cc b/modules/media/media.cc index 287c675d7..3ea78174f 100644 --- a/modules/media/media.cc +++ b/modules/media/media.cc @@ -356,13 +356,13 @@ write_file(const m::room &room, const string_view &content_type) { //TODO: TXN - send(room, user_id, "ircd.file.stat", "size", + send(room, user_id, "ircd.file.stat", "size", json::members { { "value", long(size(content)) } }); //TODO: TXN - send(room, user_id, "ircd.file.stat", "type", + send(room, user_id, "ircd.file.stat", "type", json::members { { "value", content_type } }); @@ -476,7 +476,7 @@ block_set(const m::room &room, block_set(mutable_buffer{b58buf}, block) }; - return send(room, user_id, "ircd.file.block", + return send(room, user_id, "ircd.file.block", json::members { { "size", long(size(block)) }, { "hash", hash }