neteja NOLINT obsolets (de 29 a 10)
This commit is contained in:
@@ -64,7 +64,7 @@ class GamepadConfigManager {
|
||||
// Escribir al archivo
|
||||
std::ofstream file(filename);
|
||||
if (!file.is_open()) {
|
||||
return false; // NOLINT(readability-simplify-boolean-expr)
|
||||
return false;
|
||||
}
|
||||
|
||||
file << j.dump(4); // Formato con indentación de 4 espacios
|
||||
@@ -92,7 +92,7 @@ class GamepadConfigManager {
|
||||
configs.clear();
|
||||
|
||||
if (!j.contains("gamepads") || !j["gamepads"].is_array()) {
|
||||
return false; // NOLINT(readability-simplify-boolean-expr)
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto& gamepad_json : j["gamepads"]) {
|
||||
|
||||
@@ -20,11 +20,11 @@ class PauseManager {
|
||||
|
||||
// --- Operadores friend ---
|
||||
friend auto operator|(Source a, Source b) -> Source {
|
||||
return static_cast<Source>(static_cast<uint8_t>(a) | static_cast<uint8_t>(b)); // NOLINT(readability-redundant-casting)
|
||||
return static_cast<Source>(static_cast<uint8_t>(a) | static_cast<uint8_t>(b));
|
||||
}
|
||||
|
||||
friend auto operator&(Source a, Source b) -> Source {
|
||||
return static_cast<Source>(static_cast<uint8_t>(a) & static_cast<uint8_t>(b)); // NOLINT(readability-redundant-casting)
|
||||
return static_cast<Source>(static_cast<uint8_t>(a) & static_cast<uint8_t>(b));
|
||||
}
|
||||
|
||||
friend auto operator~(Source a) -> uint8_t {
|
||||
|
||||
@@ -218,7 +218,7 @@ void Screen::handleCanvasResized() {
|
||||
|
||||
// Registra los callbacks nativos de Emscripten que restauran el canvas cuando
|
||||
// SDL3 no emite los events equivalentes. Fuera de Emscripten es un no-op.
|
||||
void Screen::registerEmscriptenEventCallbacks() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
void Screen::registerEmscriptenEventCallbacks() {
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_set_fullscreenchange_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, nullptr, EM_TRUE, onEmFullscreenChange);
|
||||
emscripten_set_orientationchange_callback(nullptr, EM_TRUE, onEmOrientationChange);
|
||||
|
||||
@@ -429,7 +429,7 @@ namespace Rendering {
|
||||
return shader;
|
||||
}
|
||||
|
||||
auto SDL3GPUShader::createShaderSPIRV(SDL_GPUDevice* device, // NOLINT(readability-convert-member-functions-to-static)
|
||||
auto SDL3GPUShader::createShaderSPIRV(SDL_GPUDevice* device,
|
||||
const uint8_t* spv_code,
|
||||
size_t spv_size,
|
||||
const char* entrypoint,
|
||||
|
||||
@@ -155,7 +155,7 @@ auto ResourcePack::addFile(const std::string& filename, const std::string& filep
|
||||
auto ResourcePack::addDirectory(const std::string& directory) -> bool {
|
||||
if (!std::filesystem::exists(directory)) {
|
||||
std::cerr << "Error: Directory does not exist: " << directory << '\n';
|
||||
return false; // NOLINT(readability-simplify-boolean-expr)
|
||||
return false;
|
||||
}
|
||||
|
||||
return std::ranges::all_of(std::filesystem::recursive_directory_iterator(directory),
|
||||
|
||||
@@ -890,7 +890,7 @@ void Player::shiftColliders() {
|
||||
}
|
||||
|
||||
// Pone las texturas del jugador
|
||||
void Player::setPlayerTextures(const std::vector<std::shared_ptr<Texture>>& texture) { // NOLINT(readability-named-parameter)
|
||||
void Player::setPlayerTextures(const std::vector<std::shared_ptr<Texture>>& texture) {
|
||||
player_sprite_->setTexture(texture[0]);
|
||||
power_sprite_->setTexture(texture[1]);
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class Player {
|
||||
void setAnimation(float delta_time); // Establece la animación según el estado (time-based)
|
||||
|
||||
// --- Texturas y animaciones ---
|
||||
void setPlayerTextures(const std::vector<std::shared_ptr<Texture>>& texture); // NOLINT(readability-avoid-const-params-in-decls) Cambia las texturas del jugador
|
||||
void setPlayerTextures(const std::vector<std::shared_ptr<Texture>>& texture);
|
||||
|
||||
// --- Gameplay: Puntuación y power-ups ---
|
||||
void addScore(int score, int lowest_hi_score_entry); // Añade puntos
|
||||
|
||||
@@ -679,7 +679,7 @@ namespace Options {
|
||||
// --- PRIMERA PASADA: Intenta asignar mandos basándose en la ruta guardada ---
|
||||
void GamepadManager::assignGamepadsByPath(
|
||||
const std::array<std::string, MAX_PLAYERS>& desired_paths,
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads, // NOLINT(readability-named-parameter)
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads,
|
||||
std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances) {
|
||||
for (size_t i = 0; i < MAX_PLAYERS; ++i) {
|
||||
const std::string& desired_path = desired_paths[i];
|
||||
@@ -705,7 +705,7 @@ namespace Options {
|
||||
// refrescamos el path guardado al del dispositivo físico actual.
|
||||
void GamepadManager::assignGamepadsByName(
|
||||
const std::array<std::string, MAX_PLAYERS>& desired_names,
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads, // NOLINT(readability-named-parameter)
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads,
|
||||
std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances) {
|
||||
for (size_t i = 0; i < MAX_PLAYERS; ++i) {
|
||||
if (gamepads_[i].instance != nullptr) {
|
||||
@@ -731,7 +731,7 @@ namespace Options {
|
||||
|
||||
// --- TERCERA PASADA: Asigna los mandos físicos restantes a los jugadores libres ---
|
||||
void GamepadManager::assignRemainingGamepads(
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads, // NOLINT(readability-named-parameter)
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads,
|
||||
std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances) {
|
||||
for (size_t i = 0; i < MAX_PLAYERS; ++i) {
|
||||
if (gamepads_[i].instance != nullptr) {
|
||||
@@ -763,7 +763,7 @@ namespace Options {
|
||||
|
||||
auto GamepadManager::isGamepadAssigned(
|
||||
const std::shared_ptr<Input::Gamepad>& physical_gamepad,
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances) -> bool { // NOLINT(readability-named-parameter)
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances) -> bool {
|
||||
return std::ranges::any_of(assigned_instances,
|
||||
[&physical_gamepad](const auto& assigned) -> auto {
|
||||
return assigned == physical_gamepad;
|
||||
|
||||
@@ -296,19 +296,19 @@ namespace Options {
|
||||
|
||||
void assignGamepadsByPath(
|
||||
const std::array<std::string, MAX_PLAYERS>& desired_paths,
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads, // NOLINT(readability-avoid-const-params-in-decls)
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads,
|
||||
std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances);
|
||||
void assignGamepadsByName(
|
||||
const std::array<std::string, MAX_PLAYERS>& desired_names,
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads, // NOLINT(readability-avoid-const-params-in-decls)
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads,
|
||||
std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances);
|
||||
void assignRemainingGamepads(
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads, // NOLINT(readability-avoid-const-params-in-decls)
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& physical_gamepads,
|
||||
std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances);
|
||||
void clearUnassignedGamepadSlots();
|
||||
[[nodiscard]] static auto isGamepadAssigned(
|
||||
const std::shared_ptr<Input::Gamepad>& physical_gamepad,
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances) -> bool; // NOLINT(readability-avoid-const-params-in-decls)
|
||||
const std::vector<std::shared_ptr<Input::Gamepad>>& assigned_instances) -> bool;
|
||||
};
|
||||
|
||||
struct Keyboard {
|
||||
|
||||
@@ -380,7 +380,7 @@ void MenuRenderer::updatePosition() {
|
||||
|
||||
// Resto de métodos (sin cambios significativos)
|
||||
|
||||
void MenuRenderer::precalculateMenuWidths(const std::vector<std::unique_ptr<MenuOption>>& all_options, const ServiceMenu* menu_state) { // NOLINT(readability-named-parameter)
|
||||
void MenuRenderer::precalculateMenuWidths(const std::vector<std::unique_ptr<MenuOption>>& all_options, const ServiceMenu* menu_state) {
|
||||
std::ranges::fill(group_menu_widths_, ServiceMenu::MIN_WIDTH);
|
||||
for (int group = 0; group < 5; ++group) {
|
||||
auto sg = static_cast<ServiceMenu::SettingsGroup>(group);
|
||||
|
||||
@@ -140,7 +140,7 @@ class MenuRenderer {
|
||||
void updateSwapAnimation(float delta_time);
|
||||
void updatePosition();
|
||||
|
||||
void precalculateMenuWidths(const std::vector<std::unique_ptr<MenuOption>>& all_options, const ServiceMenu* menu_state); // NOLINT(readability-avoid-const-params-in-decls)
|
||||
void precalculateMenuWidths(const std::vector<std::unique_ptr<MenuOption>>& all_options, const ServiceMenu* menu_state);
|
||||
[[nodiscard]] auto getMenuWidthForGroup(ServiceMenu::SettingsGroup group) const -> int;
|
||||
[[nodiscard]] auto getAnimatedSelectedColor() const -> Color;
|
||||
void updateColorCounter();
|
||||
|
||||
Reference in New Issue
Block a user