From a79bedfa7f47002e027f65f067fcbd27919106e0 Mon Sep 17 00:00:00 2001 From: jam1garner <8260240+jam1garner@users.noreply.github.com> Date: Fri, 15 May 2020 22:02:45 -0400 Subject: [PATCH] Prefix underscore to unused variables --- src/common/mod.rs | 4 ++-- src/hitbox_visualizer/mod.rs | 24 ++++++++++++------------ src/training/Ledge.rs | 2 +- src/training/Shield.rs | 2 +- src/training/Tech.rs | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/common/mod.rs b/src/common/mod.rs index c3af5ce..3c410f0 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -38,7 +38,7 @@ pub unsafe fn is_operation_cpu(module_accessor: &mut app::BattleObjectModuleAcce let entry_id_int = WorkModule::get_int(module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as i32; - let entry_id = app::FighterEntryID(entry_id_int); + let _entry_id = app::FighterEntryID(entry_id_int); // let mut mgr = FighterManager{_address : fighter_manager_addr as u64}; // let fighter_information = lua_bind::FighterManager::get_fighter_information(&mut mgr, entry_id) as *mut FighterInformation; // println!("FighterInformation: {:#?}", fighter_information); @@ -72,7 +72,7 @@ pub unsafe fn is_in_landing(module_accessor: &mut app::BattleObjectModuleAccesso } pub unsafe fn perform_defensive_option( - module_accessor: &mut app::BattleObjectModuleAccessor, + _module_accessor: &mut app::BattleObjectModuleAccessor, flag: &mut i32, ) { match (*menu).DEFENSIVE_STATE { diff --git a/src/hitbox_visualizer/mod.rs b/src/hitbox_visualizer/mod.rs index c9530e3..c7b9601 100644 --- a/src/hitbox_visualizer/mod.rs +++ b/src/hitbox_visualizer/mod.rs @@ -136,18 +136,18 @@ pub unsafe fn generate_hitbox_effects( z2: Option, color: Vector3f, ) { - let red = L2CValue::new_num(color.x); - let green = L2CValue::new_num(color.y); - let blue = L2CValue::new_num(color.z); + let _red = L2CValue::new_num(color.x); + let _green = L2CValue::new_num(color.y); + let _blue = L2CValue::new_num(color.z); let size_mult = 19.0 / 200.0; - let shield_effect = L2CValue::new_int(hash40("sys_shield")); - let zero_rot = L2CValue::new_num(0.0); - let terminate = L2CValue::new_bool(true); - let effect_size = L2CValue::new_num(size * size_mult); + let _shield_effect = L2CValue::new_int(hash40("sys_shield")); + let _zero_rot = L2CValue::new_num(0.0); + let _terminate = L2CValue::new_bool(true); + let _effect_size = L2CValue::new_num(size * size_mult); - let rate = L2CValue::new_num(8.0); + let _rate = L2CValue::new_num(8.0); let x_dist: f32; let y_dist: f32; @@ -293,11 +293,11 @@ unsafe fn handle_attack(lua_state: u64) { // get all necessary grabbox params let id = l2c_agent.pop_lua_stack(1); // int let joint = l2c_agent.pop_lua_stack(3); // hash40 - let damage = l2c_agent.pop_lua_stack(4); // float + let _damage = l2c_agent.pop_lua_stack(4); // float let _angle = l2c_agent.pop_lua_stack(5); // int - let kbg = l2c_agent.pop_lua_stack(6); // int - let fkb = l2c_agent.pop_lua_stack(7); // int - let bkb = l2c_agent.pop_lua_stack(8); // int + let _kbg = l2c_agent.pop_lua_stack(6); // int + let _fkb = l2c_agent.pop_lua_stack(7); // int + let _bkb = l2c_agent.pop_lua_stack(8); // int let size = l2c_agent.pop_lua_stack(9); // float let x = l2c_agent.pop_lua_stack(10); // float let y = l2c_agent.pop_lua_stack(11); // float diff --git a/src/training/Ledge.rs b/src/training/Ledge.rs index 3e2a92e..0d2e9df 100644 --- a/src/training/Ledge.rs +++ b/src/training/Ledge.rs @@ -60,7 +60,7 @@ pub unsafe fn should_perform_defensive_option( pub unsafe fn defensive_option( module_accessor: &mut app::BattleObjectModuleAccessor, - category: i32, + _category: i32, flag: &mut i32, ) { let status = StatusModule::status_kind(module_accessor) as i32; diff --git a/src/training/Shield.rs b/src/training/Shield.rs index b387f6a..08a1a13 100644 --- a/src/training/Shield.rs +++ b/src/training/Shield.rs @@ -5,7 +5,7 @@ use smash::hash40; use smash::lib::lua_const::*; pub unsafe fn get_param_float( - module_accessor: &mut app::BattleObjectModuleAccessor, + _module_accessor: &mut app::BattleObjectModuleAccessor, param_type: u64, param_hash: u64, ) -> Option { diff --git a/src/training/Tech.rs b/src/training/Tech.rs index f20dab5..7255ecd 100644 --- a/src/training/Tech.rs +++ b/src/training/Tech.rs @@ -86,7 +86,7 @@ pub unsafe fn should_perform_defensive_option( pub unsafe fn get_command_flag_cat( module_accessor: &mut app::BattleObjectModuleAccessor, - category: i32, + _category: i32, flag: &mut i32, ) { if menu.TECH_STATE != NONE && is_training_mode() && is_operation_cpu(module_accessor) {