Additional std::find fixes
This commit is contained in:
parent
537c04ac14
commit
2b808be027
2 changed files with 3 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
#include "common/thread_queue_list.h"
|
#include "common/thread_queue_list.h"
|
||||||
|
@ -44,7 +45,7 @@ public:
|
||||||
Result WaitSynchronization(bool* wait) {
|
Result WaitSynchronization(bool* wait) {
|
||||||
if (status != THREADSTATUS_DORMANT) {
|
if (status != THREADSTATUS_DORMANT) {
|
||||||
Handle thread = GetCurrentThreadHandle();
|
Handle thread = GetCurrentThreadHandle();
|
||||||
if (std::find(waiting_threads.begin(), waiting_threads.end(), thread) == waiting_threads.end()) {
|
if (find(waiting_threads.begin(), waiting_threads.end(), thread) == waiting_threads.end()) {
|
||||||
waiting_threads.push_back(thread);
|
waiting_threads.push_back(thread);
|
||||||
}
|
}
|
||||||
WaitCurrentThread(WAITTYPE_THREADEND, this->GetHandle());
|
WaitCurrentThread(WAITTYPE_THREADEND, this->GetHandle());
|
||||||
|
|
|
@ -108,7 +108,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
auto obj = std::pair<u32,PicaCommandList>(address, cmdlist);
|
auto obj = std::pair<u32,PicaCommandList>(address, cmdlist);
|
||||||
auto it = std::find(command_lists.begin(), command_lists.end(), obj);
|
auto it = find(command_lists.begin(), command_lists.end(), obj);
|
||||||
bool is_new = (it == command_lists.end());
|
bool is_new = (it == command_lists.end());
|
||||||
if (is_new)
|
if (is_new)
|
||||||
command_lists.push_back(obj);
|
command_lists.push_back(obj);
|
||||||
|
|
Loading…
Reference in a new issue