Skip to content
Permalink
Browse files
Refactor Thread class to improve readability and portability
- Fix some incompatibilities with obscure platforms (AIX and WinCE)
- Clean up Thread class interface
- Add m_ prefix to private member variables
- Simplify platform-dependent logic, reducing preprocessor
  conditional clauses and improving readibility
- Add Thread class documentation
  • Loading branch information
kwolekr committed Oct 17, 2015
1 parent 6be74d1 commit 765a834cd04473afeb4b86b445dee901e0d0c83c
Show file tree
Hide file tree
Showing 3 changed files with 350 additions and 205 deletions.
@@ -219,7 +219,7 @@ void EmergeManager::initMapgens()
Mapgen *EmergeManager::getCurrentMapgen()
{
for (u32 i = 0; i != m_threads.size(); i++) {
if (m_threads[i]->isSameThread())
if (m_threads[i]->isCurrentThread())
return m_threads[i]->m_mapgen;
}

@@ -476,7 +476,7 @@ EmergeThread::EmergeThread(Server *server, int ethreadid) :
m_emerge(NULL),
m_mapgen(NULL)
{
name = "Emerge-" + itos(ethreadid);
m_name = "Emerge-" + itos(ethreadid);
}


0 comments on commit 765a834

Please sign in to comment.