From cbdcd051c63c4ff98dfb4ff45388e722f8d0a2de Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 27 Mar 2026 13:10:26 +0000 Subject: Switch the extensible system to using shared pointers. --- modules/geoclass.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/geoclass.cpp') 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 counts; + std::map 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 -- cgit v1.3.1-10-gc9f91