MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / undoScan

Method undoScan

Source/MemoryScanner/MemoryScanner.cpp:681–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679}
680
681bool MemScanner::undoScan()
682{
683 if (m_undoCount > 0)
684 {
685 m_resultsConsoleAddr = m_UndoStack.top().data;
686 m_resultCount = m_resultsConsoleAddr.size();
687 bool wasUninitialzed = m_UndoStack.top().wasUnknownInitialState;
688
689 m_UndoStack.pop();
690 m_undoCount = m_UndoStack.size();
691
692 if (wasUninitialzed)
693 {
694 u32 ramSize = static_cast<u32>(DolphinComm::DolphinAccessor::getRAMTotalSize());
695 int alignementDivision =
696 m_enforceMemAlignment ? Common::getNbrBytesAlignmentForType(m_memType) : 1;
697 m_resultCount = ((ramSize / alignementDivision) -
698 Common::getSizeForType(m_memType, static_cast<size_t>(1)));
699 m_wasUnknownInitialValue = true;
700 m_memSize = 1;
701 }
702
703 return true;
704 }
705 return false;
706}
707
708size_t MemScanner::getResultCount() const
709{

Callers 1

onUndoScanMethod · 0.80

Calls 2

getSizeForTypeFunction · 0.85

Tested by

no test coverage detected