@@ -279,9 +279,7 @@ void CSqlScore::LoadScore(int ClientID)
279279 Tmp->m_pSqlData = this ;
280280
281281 void *LoadThread = thread_init (LoadScoreThread, Tmp);
282- #if defined(CONF_FAMILY_UNIX)
283- pthread_detach ((pthread_t )LoadThread);
284- #endif
282+ thread_detach (LoadThread);
285283}
286284
287285void CSqlScore::SaveTeamScoreThread (void *pUser)
@@ -416,9 +414,7 @@ void CSqlScore::MapVote(int ClientID, const char* MapName)
416414 Tmp->m_pSqlData = this ;
417415
418416 void *VoteThread = thread_init (MapVoteThread, Tmp);
419- #if defined(CONF_FAMILY_UNIX)
420- pthread_detach ((pthread_t )VoteThread);
421- #endif
417+ thread_detach (VoteThread);
422418}
423419
424420void CSqlScore::MapVoteThread (void *pUser)
@@ -518,9 +514,7 @@ void CSqlScore::MapInfo(int ClientID, const char* MapName)
518514 Tmp->m_pSqlData = this ;
519515
520516 void *InfoThread = thread_init (MapInfoThread, Tmp);
521- #if defined(CONF_FAMILY_UNIX)
522- pthread_detach ((pthread_t )InfoThread);
523- #endif
517+ thread_detach (InfoThread);
524518}
525519
526520void CSqlScore::MapInfoThread (void *pUser)
@@ -693,9 +687,7 @@ void CSqlScore::SaveScore(int ClientID, float Time, float CpTime[NUM_CHECKPOINTS
693687 Tmp->m_pSqlData = this ;
694688
695689 void *SaveThread = thread_init (SaveScoreThread, Tmp);
696- #if defined(CONF_FAMILY_UNIX)
697- pthread_detach ((pthread_t )SaveThread);
698- #endif
690+ thread_detach (SaveThread);
699691}
700692
701693void CSqlScore::SaveTeamScore (int * aClientIDs, unsigned int Size, float Time)
@@ -714,9 +706,7 @@ void CSqlScore::SaveTeamScore(int* aClientIDs, unsigned int Size, float Time)
714706 Tmp->m_pSqlData = this ;
715707
716708 void *SaveTeamThread = thread_init (SaveTeamScoreThread, Tmp);
717- #if defined(CONF_FAMILY_UNIX)
718- pthread_detach ((pthread_t )SaveTeamThread);
719- #endif
709+ thread_detach (SaveTeamThread);
720710}
721711
722712void CSqlScore::ShowTeamRankThread (void *pUser)
@@ -983,9 +973,7 @@ void CSqlScore::ShowTeamRank(int ClientID, const char* pName, bool Search)
983973 Tmp->m_pSqlData = this ;
984974
985975 void *TeamRankThread = thread_init (ShowTeamRankThread, Tmp);
986- #if defined(CONF_FAMILY_UNIX)
987- pthread_detach ((pthread_t )TeamRankThread);
988- #endif
976+ thread_detach (TeamRankThread);
989977}
990978
991979void CSqlScore::ShowRank (int ClientID, const char * pName, bool Search)
@@ -998,9 +986,7 @@ void CSqlScore::ShowRank(int ClientID, const char* pName, bool Search)
998986 Tmp->m_pSqlData = this ;
999987
1000988 void *RankThread = thread_init (ShowRankThread, Tmp);
1001- #if defined(CONF_FAMILY_UNIX)
1002- pthread_detach ((pthread_t )RankThread);
1003- #endif
989+ thread_detach (RankThread);
1004990}
1005991
1006992void CSqlScore::ShowTop5Thread (void *pUser)
@@ -1152,9 +1138,7 @@ void CSqlScore::ShowTeamTop5(IConsole::IResult *pResult, int ClientID, void *pUs
11521138 Tmp->m_pSqlData = this ;
11531139
11541140 void *TeamTop5Thread = thread_init (ShowTeamTop5Thread, Tmp);
1155- #if defined(CONF_FAMILY_UNIX)
1156- pthread_detach ((pthread_t )TeamTop5Thread);
1157- #endif
1141+ thread_detach (TeamTop5Thread);
11581142}
11591143
11601144void CSqlScore::ShowTop5 (IConsole::IResult *pResult, int ClientID, void *pUserData, int Debut)
@@ -1165,9 +1149,7 @@ void CSqlScore::ShowTop5(IConsole::IResult *pResult, int ClientID, void *pUserDa
11651149 Tmp->m_pSqlData = this ;
11661150
11671151 void *Top5Thread = thread_init (ShowTop5Thread, Tmp);
1168- #if defined(CONF_FAMILY_UNIX)
1169- pthread_detach ((pthread_t )Top5Thread);
1170- #endif
1152+ thread_detach (Top5Thread);
11711153}
11721154
11731155void CSqlScore::ShowTimes (int ClientID, int Debut)
@@ -1179,9 +1161,7 @@ void CSqlScore::ShowTimes(int ClientID, int Debut)
11791161 Tmp->m_Search = false ;
11801162
11811163 void *TimesThread = thread_init (ShowTimesThread, Tmp);
1182- #if defined(CONF_FAMILY_UNIX)
1183- pthread_detach ((pthread_t )TimesThread);
1184- #endif
1164+ thread_detach (TimesThread);
11851165}
11861166
11871167void CSqlScore::ShowTimes (int ClientID, const char * pName, int Debut)
@@ -1194,9 +1174,7 @@ void CSqlScore::ShowTimes(int ClientID, const char* pName, int Debut)
11941174 Tmp->m_Search = true ;
11951175
11961176 void *TimesThread = thread_init (ShowTimesThread, Tmp);
1197- #if defined(CONF_FAMILY_UNIX)
1198- pthread_detach ((pthread_t )TimesThread);
1199- #endif
1177+ thread_detach (TimesThread);
12001178}
12011179
12021180void CSqlScore::FuzzyString (char *pString)
@@ -1399,9 +1377,7 @@ void CSqlScore::ShowPoints(int ClientID, const char* pName, bool Search)
13991377 Tmp->m_pSqlData = this ;
14001378
14011379 void *PointsThread = thread_init (ShowPointsThread, Tmp);
1402- #if defined(CONF_FAMILY_UNIX)
1403- pthread_detach ((pthread_t )PointsThread);
1404- #endif
1380+ thread_detach (PointsThread);
14051381}
14061382
14071383void CSqlScore::ShowTopPointsThread (void *pUser)
@@ -1463,9 +1439,7 @@ void CSqlScore::ShowTopPoints(IConsole::IResult *pResult, int ClientID, void *pU
14631439 Tmp->m_pSqlData = this ;
14641440
14651441 void *TopPointsThread = thread_init (ShowTopPointsThread, Tmp);
1466- #if defined(CONF_FAMILY_UNIX)
1467- pthread_detach ((pthread_t )TopPointsThread);
1468- #endif
1442+ thread_detach (TopPointsThread);
14691443}
14701444
14711445void CSqlScore::RandomMapThread (void *pUser)
@@ -1589,9 +1563,7 @@ void CSqlScore::RandomMap(int ClientID, int stars)
15891563 Tmp->m_pSqlData = this ;
15901564
15911565 void *RandomThread = thread_init (RandomMapThread, Tmp);
1592- #if defined(CONF_FAMILY_UNIX)
1593- pthread_detach ((pthread_t )RandomThread);
1594- #endif
1566+ thread_detach (RandomThread);
15951567}
15961568
15971569void CSqlScore::RandomUnfinishedMap (int ClientID, int stars)
@@ -1603,9 +1575,7 @@ void CSqlScore::RandomUnfinishedMap(int ClientID, int stars)
16031575 Tmp->m_pSqlData = this ;
16041576
16051577 void *RandomUnfinishedThread = thread_init (RandomUnfinishedMapThread, Tmp);
1606- #if defined(CONF_FAMILY_UNIX)
1607- pthread_detach ((pthread_t )RandomUnfinishedThread);
1608- #endif
1578+ thread_detach (RandomUnfinishedThread);
16091579}
16101580
16111581void CSqlScore::SaveTeam (int Team, const char * Code, int ClientID, const char * Server)
@@ -1630,9 +1600,7 @@ void CSqlScore::SaveTeam(int Team, const char* Code, int ClientID, const char* S
16301600 Tmp->m_pSqlData = this ;
16311601
16321602 void *SaveThread = thread_init (SaveTeamThread, Tmp);
1633- #if defined(CONF_FAMILY_UNIX)
1634- pthread_detach ((pthread_t )SaveThread);
1635- #endif
1603+ thread_detach (SaveThread);
16361604}
16371605
16381606void CSqlScore::SaveTeamThread (void *pUser)
@@ -1745,9 +1713,7 @@ void CSqlScore::LoadTeam(const char* Code, int ClientID)
17451713 Tmp->m_pSqlData = this ;
17461714
17471715 void *LoadThread = thread_init (LoadTeamThread, Tmp);
1748- #if defined(CONF_FAMILY_UNIX)
1749- pthread_detach ((pthread_t )LoadThread);
1750- #endif
1716+ thread_detach (LoadThread);
17511717}
17521718
17531719void CSqlScore::LoadTeamThread (void *pUser)
0 commit comments