code clean up

This commit is contained in:
Roy Qu 2024-04-07 21:40:54 +08:00
parent ea03f788d1
commit 97f5420a27
2 changed files with 0 additions and 10 deletions

View File

@ -1580,11 +1580,6 @@ size_t UndoItem::changeNumber() const
return mChangeNumber;
}
unsigned int UndoItem::memoryUsage() const
{
return mMemoryUsage;
}
UndoItem::UndoItem(ChangeReason reason, SelectionMode selMode,
BufferCoord startPos, BufferCoord endPos,
const QStringList& text, int number)
@ -1599,9 +1594,6 @@ UndoItem::UndoItem(ChangeReason reason, SelectionMode selMode,
foreach (const QString& s, text) {
length+=s.length();
}
mMemoryUsage = length * sizeof(QChar) + text.length() * sizeof(QString)
+ sizeof(UndoItem);
// qDebug()<<mMemoryUsage;
}
ChangeReason UndoItem::changeReason() const

View File

@ -656,7 +656,6 @@ private:
BufferCoord mChangeEndPos;
QStringList mChangeText;
size_t mChangeNumber;
unsigned int mMemoryUsage;
public:
UndoItem(ChangeReason reason,
SelectionMode selMode,
@ -671,7 +670,6 @@ public:
BufferCoord changeEndPos() const;
QStringList changeText() const;
size_t changeNumber() const;
unsigned int memoryUsage() const;
};
using PUndoItem = std::shared_ptr<UndoItem>;