summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2023-11-16 21:49:48 +0000
committerSadie Powell <sadie@witchery.services>2023-11-16 21:49:48 +0000
commit70d72b62df3045590297eceba5649b8417dc3f4a (patch)
tree2f2d10eb8c1d8207d0fe8b8e27cd90b3d7b76908 /src
parent46209895e3f46f183a293fe26e26bdfdc2423e8d (diff)
Avoid needing to cast CurrentUplink by changing it to a size_t.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
-rw-r--r--src/uplink.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b41c591d7..e8e1a6a41 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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
{
diff --git a/src/uplink.cpp b/src/uplink.cpp
index 67599c2d6..4d49b93d6 100644
--- a/src/uplink.cpp
+++ b/src/uplink.cpp
@@ -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];