mirror of
https://github.com/matrix-construct/construct
synced 2024-06-10 14:08:56 +02:00
ircd: Fix warning/error.
ircd: Minor cleanup.
This commit is contained in:
parent
125ff95875
commit
fc742ae2d0
|
@ -50,7 +50,7 @@ struct ircd::m::room::messages
|
|||
event::fetch _event;
|
||||
|
||||
public:
|
||||
operator bool() const { return bool(it); }
|
||||
explicit operator bool() const { return bool(it); }
|
||||
bool operator!() const { return !it; }
|
||||
|
||||
event::id::buf event_id() const; // deprecated; will remove
|
||||
|
|
|
@ -896,7 +896,11 @@ ircd::http::parser::content_length(const string_view &str)
|
|||
|
||||
long ret;
|
||||
const char *start(str.data());
|
||||
const bool parsed(qi::parse(start, start + str.size(), grammar, ret));
|
||||
const bool parsed
|
||||
{
|
||||
qi::parse(start, start + str.size(), grammar, ret)
|
||||
};
|
||||
|
||||
if(!parsed || ret < 0)
|
||||
throw error
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ ircd::m::room::state::purge_replaced(const room::id &room_id)
|
|||
|
||||
for(; it; ++it)
|
||||
{
|
||||
const m::event::idx &event_idx(it);
|
||||
const m::event::idx &event_idx(it.event_idx());
|
||||
if(!m::get(std::nothrow, event_idx, "state_key", [](const auto &) {}))
|
||||
continue;
|
||||
|
||||
|
@ -152,7 +152,7 @@ ircd::m::room::state::rebuild_present(const room::id &room_id)
|
|||
|
||||
for(; it; ++it)
|
||||
{
|
||||
const m::event::idx &event_idx{it};
|
||||
const m::event::idx &event_idx{it.event_idx()};
|
||||
if(!state.is(std::nothrow, event_idx))
|
||||
continue;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ noexcept
|
|||
reinterpret_cast<__m128i *>(begin(out))
|
||||
};
|
||||
|
||||
while(reinterpret_cast<const char *>(src_) + sizeof(__m128i) < stop)
|
||||
while(intptr_t(src_) < intptr_t(stop) - ssize_t(sizeof(__m128i)))
|
||||
{
|
||||
const __m128i lit_A1 { _mm_set1_epi8('A' - 1) };
|
||||
const __m128i lit_Z1 { _mm_set1_epi8('Z' + 1) };
|
||||
|
|
|
@ -323,7 +323,7 @@ ircd::m::sync::room_account_data_polylog_tags(data &data)
|
|||
if(!event.valid)
|
||||
return true;
|
||||
|
||||
json::stack::member tag
|
||||
json::stack::member
|
||||
{
|
||||
tags, state_key, json::get<"content"_>(event)
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue