Compilation fixes for Android+boost
This commit is contained in:
@@ -81,7 +81,7 @@ private:
|
|||||||
string files[1024];
|
string files[1024];
|
||||||
|
|
||||||
void cleanup();
|
void cleanup();
|
||||||
vector<boost::thread> mWorkerThread;
|
vector<boost::thread*> mWorkerThread;
|
||||||
Rules* mRules;
|
Rules* mRules;
|
||||||
bool mProcessing;
|
bool mProcessing;
|
||||||
|
|
||||||
|
|||||||
@@ -452,7 +452,8 @@ TestSuite::~TestSuite()
|
|||||||
mProcessing = false;
|
mProcessing = false;
|
||||||
while(mWorkerThread.size())
|
while(mWorkerThread.size())
|
||||||
{
|
{
|
||||||
mWorkerThread.back().join();
|
mWorkerThread.back()->join();
|
||||||
|
SAFE_DELETE(mWorkerThread.back());
|
||||||
mWorkerThread.pop_back();
|
mWorkerThread.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,13 +546,18 @@ int TestSuite::loadNext()
|
|||||||
if(!mProcessing)
|
if(!mProcessing)
|
||||||
{ // "I don't like to wait" mode
|
{ // "I don't like to wait" mode
|
||||||
mProcessing = true;
|
mProcessing = true;
|
||||||
mWorkerThread.clear();
|
while(mWorkerThread.size())
|
||||||
|
{
|
||||||
|
mWorkerThread.back()->join();
|
||||||
|
SAFE_DELETE(mWorkerThread.back());
|
||||||
|
mWorkerThread.pop_back();
|
||||||
|
}
|
||||||
size_t thread_count = 1;
|
size_t thread_count = 1;
|
||||||
#ifdef QT_CONFIG
|
#ifdef QT_CONFIG
|
||||||
thread_count = QThread::idealThreadCount();
|
thread_count = QThread::idealThreadCount();
|
||||||
#endif
|
#endif
|
||||||
for(size_t i = 0; i < (thread_count-1); i++)
|
for(size_t i = 0; i < (thread_count-1); i++)
|
||||||
mWorkerThread.push_back(boost::thread(ThreadProc, this));
|
mWorkerThread.push_back(new boost::thread(ThreadProc, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|||||||
Reference in New Issue
Block a user