use unordered_map instead of vector

This commit is contained in:
AzuLX 2026-01-09 19:22:00 +00:00
parent 1533cc3e84
commit 604ce89673
No known key found for this signature in database
GPG Key ID: BED7E7DC23A637BC
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ namespace GleeBug
{
//check if this address had a breakpoint that was recently deleted
auto& deletedBps = mProcess->recentlyDeletedSwbp;
auto foundIt = std::find(deletedBps.begin(), deletedBps.end(), exceptionAddress);
auto foundIt = deletedBps.find(exceptionAddress);
if(foundIt != deletedBps.end() && mThread)
{
Registers(mThread->hThread, CONTEXT_CONTROL).Gip = exceptionAddress;

View File

@ -68,7 +68,7 @@ namespace GleeBug
return false;
FlushInstructionCache(hProcess, nullptr, 0);
recentlyDeletedSwbp.push_back(address);
recentlyDeletedSwbp.insert(address);
//remove the breakpoint from the maps
softwareBreakpointReferences.erase(info.address);

View File

@ -32,7 +32,7 @@ namespace GleeBug
MemoryBreakpointSet memoryBreakpointRanges;
MemoryBreakpointMap memoryBreakpointPages;
std::vector<ptr> recentlyDeletedSwbp;
std::unordered_set<ptr> recentlyDeletedSwbp;
/**
\brief Constructor.