diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-29 07:02:32 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-29 07:02:32 +0100 |
commit | 271b111558f1a4aad2b580a7328cd8714834e41c (patch) | |
tree | 404ad1e0479f9121830657066a3fabc0331f5223 /src/EventAccessors.h | |
parent | Remove a few casts (diff) | |
download | nheko-271b111558f1a4aad2b580a7328cd8714834e41c.tar.xz |
Reduce allocations for accessing event members
Diffstat (limited to 'src/EventAccessors.h')
-rw-r--r-- | src/EventAccessors.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/EventAccessors.h b/src/EventAccessors.h index c6b8e854..37b12ce0 100644 --- a/src/EventAccessors.h +++ b/src/EventAccessors.h @@ -38,13 +38,13 @@ struct detector<Default, std::void_t<Op<Args...>>, Op, Args...> } namespace mtx::accessors { -std::string +const std::string & event_id(const mtx::events::collections::TimelineEvents &event); -std::string +const std::string & room_id(const mtx::events::collections::TimelineEvents &event); -std::string +const std::string & sender(const mtx::events::collections::TimelineEvents &event); bool @@ -86,7 +86,7 @@ std::string blurhash(const mtx::events::collections::TimelineEvents &event); std::string mimetype(const mtx::events::collections::TimelineEvents &event); -mtx::common::Relations +const mtx::common::Relations & relations(const mtx::events::collections::TimelineEvents &event); void set_relations(mtx::events::collections::TimelineEvents &event, mtx::common::Relations relations); |