Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 765a834
Show file tree
Hide file tree
Showing 3 changed files with 350 additions and 205 deletions.
4 changes: 2 additions & 2 deletions src/emerge.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
}


Expand Down

0 comments on commit 765a834

Please sign in to comment.