0
0
Fork 0
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:
Jason Volk 2019-08-16 03:00:51 -07:00
parent 125ff95875
commit fc742ae2d0
5 changed files with 10 additions and 6 deletions

View file

@ -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

View file

@ -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
{

View file

@ -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;

View file

@ -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) };

View file

@ -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)
};