Skip to content

Commit

Permalink
Removed remnant of unused optimization attempt.
Browse files Browse the repository at this point in the history
Originally was going to parse two-char width in order to speed
up iteration, but optimization was premature and wasn't any
more performant.
  • Loading branch information
Eoin-ONeill-Yokai committed Jan 5, 2022
1 parent 33d0c1f commit 1917081
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bsnes/ui-qt/debugger/tools/qhexedit2/qhexedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ QHexEdit::ScopedMemoryTracker::ScopedMemoryTracker(QHexEdit *editor)

for (qint64 i = first; i < qMin(editorSize, last + BYTES_PER_LINE + 1); i++) {
const qint64 addr = i + _editor->_addressOffset;
quint16 value = qFromLittleEndian<quint16>(currentData.mid(i-first, 1).data());
char value = currentData.at(i-first);
_dataHash.insert(addr, value);
}
}
Expand All @@ -1038,7 +1038,7 @@ QHexEdit::ScopedMemoryTracker::~ScopedMemoryTracker() {
const qint64 addr = i + _editor->_addressOffset;
// Track any changes to memory we saw when the object was created, and
// register those changes with the memory tracker...
const quint16 value = qFromLittleEndian<quint16>(currentData.mid(i-first, 1).data());
char value = currentData.at(i-first);
if (_dataHash.contains(addr) && _dataHash[addr] != value) {
if (_editor->_hexChangesMap.contains(addr)) {
_editor->_hexChangesMap[addr] = FRAMES_TO_FADE_HEXBG;
Expand Down

0 comments on commit 1917081

Please sign in to comment.