clang-tidy
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <fstream> // Para basic_ostream, operator<<, basic_ostream::operator<<, basic_ofstream, basic_istream, basic_ifstream, ifstream, ofstream
|
||||
#include <functional> // Para function
|
||||
#include <map> // Para map, operator==, _Rb_tree_const_iterator
|
||||
#include <ranges> // Para std::ranges::any_of
|
||||
#include <stdexcept> // Para invalid_argument, out_of_range
|
||||
#include <string> // Para char_traits, stoi, operator==, operator<<, allocator, string, basic_string, operator<=>, getline
|
||||
#include <utility> // Para swap, pair
|
||||
@@ -392,12 +393,10 @@ void GamepadManager::clearUnassignedGamepadSlots() {
|
||||
auto GamepadManager::isGamepadAssigned(
|
||||
const std::shared_ptr<Input::Gamepad>& physical_gamepad,
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances) -> bool {
|
||||
for (const auto& assigned : assigned_instances) {
|
||||
if (assigned == physical_gamepad) {
|
||||
return true; // Encontrado, por lo tanto, ya está asignado.
|
||||
}
|
||||
}
|
||||
return false; // No se encontró en la lista.
|
||||
return std::ranges::any_of(assigned_instances,
|
||||
[&physical_gamepad](const auto& assigned) {
|
||||
return assigned == physical_gamepad;
|
||||
});
|
||||
}
|
||||
|
||||
// Convierte un player id a texto segun Lang
|
||||
|
||||
Reference in New Issue
Block a user