Reduce number of unneeded copies
This patch aims at reducing the number of copies for obejcts that could be referenced rather than copied, because they're not modified during the computation.
This commit is contained in:
@@ -54,7 +54,7 @@ QVariant EntryHistoryModel::data(const QModelIndex& index, int role) const
|
||||
|
||||
if (role == Qt::DisplayRole || role == Qt::UserRole) {
|
||||
Entry* entry = entryFromIndex(index);
|
||||
TimeInfo timeInfo = entry->timeInfo();
|
||||
const TimeInfo& timeInfo = entry->timeInfo();
|
||||
QDateTime lastModificationLocalTime = timeInfo.lastModificationTime().toLocalTime();
|
||||
switch (index.column()) {
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user