Skip to content

Commit

Permalink
Initialize with initialization lists
Browse files Browse the repository at this point in the history
  • Loading branch information
sithlord48 committed Aug 16, 2020
1 parent 32be52e commit be72940
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
10 changes: 6 additions & 4 deletions src/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ class CharCommand : public QUndoCommand

CharCommand::CharCommand(Chunks * chunks, CCmd cmd, qint64 charPos, char newChar, QUndoCommand *parent)
: QUndoCommand(parent)
, _chunks(chunks)
, _charPos(charPos)
, _wasChanged(false)
, _newChar(newChar)
, _oldChar('\0')
, _cmd(cmd)
{
_chunks = chunks;
_charPos = charPos;
_newChar = newChar;
_cmd = cmd;
}

bool CharCommand::mergeWith(const QUndoCommand *command)
Expand Down
31 changes: 15 additions & 16 deletions src/qhexedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@
// ********************************************************************** Constructor, destructor

QHexEdit::QHexEdit(QWidget *parent) : QAbstractScrollArea(parent)
, _addressArea(true)
, _addressWidth(4)
, _asciiArea(true)
, _bytesPerLine(16)
, _hexCharsInLine(47)
, _highlighting(true)
, _overwriteMode(true)
, _readOnly(false)
, _hexCaps(false)
, _dynamicBytesPerLine(false)
, _editAreaIsAscii(false)
, _chunks(new Chunks(this))
, _cursorPosition(0)
, _lastEventSize(0)
, _undoStack(new UndoStack(_chunks, this))
{
_addressArea = true;
_addressWidth = 4;
_asciiArea = true;
_overwriteMode = true;
_highlighting = true;
_readOnly = false;
_cursorPosition = 0;
_lastEventSize = 0;
_hexCharsInLine = 47;
_bytesPerLine = 16;
_editAreaIsAscii = false;
_hexCaps = false;
_dynamicBytesPerLine = false;

_chunks = new Chunks(this);
_undoStack = new UndoStack(_chunks, this);
#ifdef Q_OS_WIN32
setFont(QFont("Courier", 10));
#else
Expand Down

0 comments on commit be72940

Please sign in to comment.