mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Pretty up code with fewer allocations
This commit is contained in:
parent
271b111558
commit
4d54876ea4
1 changed files with 2 additions and 2 deletions
|
@ -108,7 +108,7 @@ EventStore::EventStore(std::string room_id, QObject *)
|
||||||
std::visit(
|
std::visit(
|
||||||
[this](const auto &e) {
|
[this](const auto &e) {
|
||||||
const auto &txn_id = e.event_id;
|
const auto &txn_id = e.event_id;
|
||||||
this->current_txn = txn_id;
|
this->current_txn = txn_id;
|
||||||
|
|
||||||
if (txn_id.empty() || txn_id[0] != 'm') {
|
if (txn_id.empty() || txn_id[0] != 'm') {
|
||||||
nhlog::ui()->debug("Invalid txn id '{}'", txn_id);
|
nhlog::ui()->debug("Invalid txn id '{}'", txn_id);
|
||||||
|
@ -451,7 +451,7 @@ EventStore::edits(const std::string &event_id)
|
||||||
std::holds_alternative<mtx::events::RoomEvent<mtx::events::msg::Redacted>>(*original_event))
|
std::holds_alternative<mtx::events::RoomEvent<mtx::events::msg::Redacted>>(*original_event))
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
const auto &original_sender = mtx::accessors::sender(*original_event);
|
const auto &original_sender = mtx::accessors::sender(*original_event);
|
||||||
const auto &original_relations = mtx::accessors::relations(*original_event);
|
const auto &original_relations = mtx::accessors::relations(*original_event);
|
||||||
|
|
||||||
std::vector<mtx::events::collections::TimelineEvents> edits;
|
std::vector<mtx::events::collections::TimelineEvents> edits;
|
||||||
|
|
Loading…
Reference in a new issue