diff --git a/module/Misc/Weapon.cpp b/module/Misc/Weapon.cpp index 4dfbd934..6f89c84c 100644 --- a/module/Misc/Weapon.cpp +++ b/module/Misc/Weapon.cpp @@ -162,8 +162,8 @@ int32_t GetWeaponID(StackStrF & name) { // Clone the string into an editable version String str(name.mPtr, static_cast< size_t >(name.mLen)); - // Strip non alphanumeric characters from the name - str.erase(std::remove_if(str.begin(), str.end(), std::not1(std::ptr_fun(::isalnum))), str.end()); + // Strip non-alphanumeric characters from the name + str.erase(std::remove_if(str.begin(), str.end(), std::function(::isalnum)), str.end()); // Convert the string to lowercase std::transform(str.begin(), str.end(), str.begin(), ::tolower); // See if we still have a valid name after the cleanup