| 1914 | } |
| 1915 | |
| 1916 | bool MainWindow::equatesAddEquateInternal(const QString &name, uint32_t address) { |
| 1917 | std::pair<map_value_t::iterator, bool> inserted = disasm.reverse.emplace(name.toUpper().toStdString(), address); |
| 1918 | if (!inserted.second) { |
| 1919 | uint32_t oldAddress = std::exchange(inserted.first->second, address); |
| 1920 | if (oldAddress == address) { |
| 1921 | return false; |
| 1922 | } |
| 1923 | std::pair<map_t::iterator, map_t::iterator> range = disasm.map.equal_range(oldAddress); |
| 1924 | for (map_t::iterator it = range.first; it != range.second; ) { |
| 1925 | if (name.compare(QString::fromStdString(it->second), Qt::CaseInsensitive) == 0) { |
| 1926 | it = disasm.map.erase(it); |
| 1927 | } else { |
| 1928 | ++it; |
| 1929 | } |
| 1930 | } |
| 1931 | } |
| 1932 | disasm.map.emplace(address, name.toStdString()); |
| 1933 | return true; |
| 1934 | } |
| 1935 | |
| 1936 | void MainWindow::disasmUpdate() { |
| 1937 | disasmUpdateAddr(m_disasm->getSelectedAddr().toInt(Q_NULLPTR, 16), true); |
nothing calls this directly
no outgoing calls
no test coverage detected