Skip to content

Commit

Permalink
Fix Sonar warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
KitsuneRal committed Sep 21, 2024
1 parent 7b3d2ba commit 4f55444
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Quotient/events/eventrelation.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ struct QUOTIENT_API EventRelation {
{
return { ReplacementType, std::move(eventId) };
}
static EventRelation replyInThread(QString threadRootId, bool isFallingBack, QString inThreadReplyEventId)
static EventRelation replyInThread(QString threadRootId, bool isFallingBack,
QString inThreadReplyEventId)
{
return { ThreadType, std::move(threadRootId), {}, std::move(isFallingBack), std::move(inThreadReplyEventId) };
return {
ThreadType, std::move(threadRootId), {}, isFallingBack, std::move(inThreadReplyEventId)
};
}
};

Expand Down
3 changes: 1 addition & 2 deletions Quotient/events/roommessageevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ bool RoomMessageEvent::isReply(bool includeFallbacks) const

QString RoomMessageEvent::replyEventId(bool includeFallbacks) const
{
const auto relation = relatesTo();
if (relation.has_value()) {
if (const auto relation = relatesTo()) {
if (relation.value().type == EventRelation::ReplyType) {
return relation.value().eventId;
} else if (relation.value().type == EventRelation::ThreadType &&
Expand Down

0 comments on commit 4f55444

Please sign in to comment.