Skip to content

Commit 05e2278

Browse files
Removed remnant of unused optimization attempt.
Originally was going to parse two-char width in order to speed up iteration, but optimization was premature and wasn't any more performant.
1 parent 8cc5bbe commit 05e2278

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bsnes/ui-qt/debugger/tools/qhexedit2/qhexedit.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ QHexEdit::ScopedMemoryTracker::ScopedMemoryTracker(QHexEdit *editor)
10231023

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

0 commit comments

Comments
 (0)