From 271b111558f1a4aad2b580a7328cd8714834e41c Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 29 Dec 2021 07:02:32 +0100 Subject: Reduce allocations for accessing event members --- src/EventAccessors.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/EventAccessors.h') 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>, 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); -- cgit 1.5.1