diff options
| author | nodchip <nodchip@gmail.com> | 2010-02-28 14:48:07 +0000 |
|---|---|---|
| committer | nodchip <nodchip@gmail.com> | 2010-02-28 14:48:07 +0000 |
| commit | cff39f53829d1bc40ac3dfbf18eac4ae30d1d14d (patch) | |
| tree | 94a5c2cf9e8ba90c9b9166afcbe9ade46087204e /Source/Core | |
| parent | 2941bef44bb9a10a862906c863609e058456b375 (diff) | |
Omitted extra lower_bound() calls to reduce the computational time. The old routine consumed more than 4% of computational time of a thread. It is a trivial modification.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5142 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 3f0cc9fae1..6a17a1b763 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -494,16 +494,11 @@ void Update() void UpdateDevices() { // Check if a hardware device must be updated - TDeviceMap::const_iterator itr = g_DeviceMap.begin(); - - while (itr != g_DeviceMap.lower_bound(IPC_FIRST_FILEIO_ID)) - { - if (itr->second->IsOpened()) - { - if (itr->second->Update()) - break; + TDeviceMap::const_iterator itrEnd = g_DeviceMap.lower_bound(IPC_FIRST_FILEIO_ID); + for (TDeviceMap::const_iterator itr = g_DeviceMap.begin(); itr != itrEnd; ++itr) { + if (itr->second->IsOpened() && itr->second->Update()) { + break; } - ++itr; } } |
