aboutsummaryrefslogtreecommitdiffstats
path: root/modules/geoclass.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-27 13:10:26 +0000
committerGravatar Sadie Powell2026-03-27 13:10:26 +0000
commitcbdcd051c63c4ff98dfb4ff45388e722f8d0a2de (patch)
treef2c61a977edce634fc28b9dead3d8bfa5782211c /modules/geoclass.cpp
parentMove CUList to be declared inside User. (diff)
Switch the extensible system to using shared pointers.
Diffstat (limited to 'modules/geoclass.cpp')
-rw-r--r--modules/geoclass.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/geoclass.cpp b/modules/geoclass.cpp
index 0ca587036..4cfcc62d2 100644
--- a/modules/geoclass.cpp
+++ b/modules/geoclass.cpp
@@ -46,7 +46,7 @@ public:
// If we can't find the location of this user then we can't assign
// them to a location-specific connect class.
- Geolocation::Location* location = geoapi ? geoapi->GetLocation(user) : nullptr;
+ const auto location = geoapi ? geoapi->GetLocation(user) : nullptr;
const std::string code = location ? location->GetCode() : "XX";
StringSplitter codes(country);
@@ -78,14 +78,14 @@ public:
return MOD_RES_PASSTHRU;
// Counter for the number of users in each country.
- std::map<Geolocation::Location*, size_t> counts;
+ std::map<Geolocation::LocationPtr, size_t> counts;
// Counter for the number of users in an unknown country.
size_t unknown = 0;
for (auto* user : ServerInstance->Users.GetLocalUsers())
{
- Geolocation::Location* location = geoapi ? geoapi->GetLocation(user) : nullptr;
+ const auto location = geoapi ? geoapi->GetLocation(user) : nullptr;
if (location)
counts[location]++;
else