mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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
This commit is contained in:
parent
6be74d17df
commit
765a834cd0
3 changed files with 352 additions and 207 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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue