code clean up
This commit is contained in:
parent
ea03f788d1
commit
97f5420a27
|
@ -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
|
||||
|
|
|
@ -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>;
|
||||
|
|
Loading…
Reference in New Issue