1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 01:53:13 +02:00

Avoid needing to cast CurrentUplink by changing it to a size_t.

This commit is contained in:
Sadie Powell
2023-11-16 21:49:48 +00:00
parent 46209895e3
commit 70d72b62df
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -384,7 +384,7 @@ namespace Anope
/** The uplink we are currently connected to
*/
extern CoreExport int CurrentUplink;
extern CoreExport size_t CurrentUplink;
/** Various methods to determine the Anope version running
*/
+1 -1
View File
@@ -39,7 +39,7 @@ static Anope::string BinaryDir; /* Full path to services bin directory */
time_t Anope::StartTime = time(NULL);
time_t Anope::CurTime = time(NULL);
int Anope::CurrentUplink = -1;
size_t Anope::CurrentUplink = -1;
class UpdateTimer : public Timer
{
+1 -1
View File
@@ -43,7 +43,7 @@ void Uplink::Connect()
return;
}
if (static_cast<unsigned>(++Anope::CurrentUplink) >= Config->Uplinks.size())
if (++Anope::CurrentUplink >= Config->Uplinks.size())
Anope::CurrentUplink = 0;
Configuration::Uplink &u = Config->Uplinks[Anope::CurrentUplink];