diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-05-30 01:09:16 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-05-30 01:09:16 +0200 |
commit | 567078d39f3c85f260efd68aeb5c99f8e4ffe348 (patch) | |
tree | 759ac4f2ec0f7c47cebb0cf3e013d377a936fabe /src/timeline/TimelineModel.cpp | |
parent | Optimize completion model by only splitting on normal spaces (diff) | |
download | nheko-567078d39f3c85f260efd68aeb5c99f8e4ffe348.tar.xz |
Try to get rid of an allocation
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 8f4a8564..cd3febd5 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -574,7 +574,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r !event_id(event).empty() && event_id(event).front() == '$'); case IsEncrypted: { auto id = event_id(event); - auto encrypted_event = events.get(id, id, false); + auto encrypted_event = events.get(id, "", false); return encrypted_event && std::holds_alternative< mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>( @@ -583,7 +583,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r case Trustlevel: { auto id = event_id(event); - auto encrypted_event = events.get(id, id, false); + auto encrypted_event = events.get(id, "", false); if (encrypted_event) { if (auto encrypted = std::get_if<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>( |