Skip to content

Commit

Permalink
Reduce overhead when returning device display name
Browse files Browse the repository at this point in the history
  • Loading branch information
Martchus committed Dec 17, 2024
1 parent 8f70037 commit 284a2b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syncthingconnector/syncthingdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct LIB_SYNCTHING_CONNECTOR_EXPORT SyncthingDev {
bool isConnected() const;
SyncthingDevStatus computeConnectedStateAccordingToCompletion() const;
SyncthingDevStatus setConnectedStateAccordingToCompletion();
const QString displayName() const;
const QString &displayName() const;

QString id;
QString name;
Expand Down Expand Up @@ -88,7 +88,7 @@ inline SyncthingDevStatus SyncthingDev::setConnectedStateAccordingToCompletion()
return status = computeConnectedStateAccordingToCompletion();
}

inline const QString SyncthingDev::displayName() const
inline const QString &SyncthingDev::displayName() const
{
return name.isEmpty() ? id : name;
}
Expand Down

0 comments on commit 284a2b4

Please sign in to comment.