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:
+1
-1
@@ -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
@@ -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
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user