Skip to content

Commit

Permalink
Fixing GCCs compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
florianessl committed Feb 1, 2025
1 parent 5de5a7d commit 08d33ab
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,17 +1096,17 @@ namespace EvalControlVarOp {
using Main_Data::game_switches, Main_Data::game_variables;

template <int param_offset>
int Constant(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
int Constant(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
return com.parameters[param_offset];
}

template <int param_offset>
int Variable(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
int Variable(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
return game_variables->Get(com.parameters[param_offset]);
}

template <int param_offset>
int VariableIndirect(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
int VariableIndirect(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
return game_variables->GetIndirect(com.parameters[param_offset]);
}

Expand Down Expand Up @@ -1291,7 +1291,7 @@ namespace EvalControlVarOp {
};

template <int param_offset>
static inline int DateTime(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
static inline int DateTime(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
std::time_t t = std::time(nullptr);
std::tm* tm = std::localtime(&t);

Expand Down Expand Up @@ -1332,7 +1332,7 @@ namespace EvalControlVarOp {
};

template <int param_offset>
static inline int ActiveMapInfo(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
static inline int ActiveMapInfo(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
switch (static_cast<ActiveMapInfoOp>(com.parameters[param_offset]))
{
case ActiveMapInfoOp::MapTileWidth:
Expand Down Expand Up @@ -1462,7 +1462,7 @@ namespace EvalControlVarOp {
};

template <int param_offset>
static inline int MessageSystemState(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
static inline int MessageSystemState(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {

switch (static_cast<MessageSystemStateOp>(com.parameters[param_offset]))
{
Expand Down Expand Up @@ -1498,7 +1498,7 @@ namespace EvalControlVarOp {
};

template <int param_offset>
static inline int MessageWindowState(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
static inline int MessageWindowState(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {

if (com.parameters[param_offset] == static_cast<int>(MessageWindowStateOp::IsMessageActive)) {
return Game_Message::IsMessageActive();
Expand Down Expand Up @@ -3708,7 +3708,7 @@ namespace EvalCondBranch {
using Main_Data::game_switches, Main_Data::game_variables, Main_Data::game_strings;
using Main_Data::game_system, Main_Data::game_actors, Main_Data::game_party;

bool Switch(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool Switch(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
return game_switches->Get(com.parameters[1]) == (com.parameters[2] == 0);
}

Expand All @@ -3718,7 +3718,7 @@ namespace EvalCondBranch {
return Game_Interpreter_Shared::CheckOperator(value1, value2, com.parameters[4]);
}

bool Timer(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool Timer(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
int value1 = game_party->GetTimerSeconds(game_party->Timer1);
int value2 = com.parameters[1];
switch (com.parameters[2]) {
Expand All @@ -3730,7 +3730,7 @@ namespace EvalCondBranch {
return false;
}

bool Gold(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool Gold(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
if (com.parameters[2] == 0) {
// Greater than or equal
return (game_party->GetGold() >= com.parameters[1]);
Expand Down Expand Up @@ -3818,7 +3818,7 @@ namespace EvalCondBranch {
return false;
}

bool VehicleInUse(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool VehicleInUse(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
Game_Vehicle::Type vehicle_id = (Game_Vehicle::Type)(com.parameters[1] + 1);
Game_Vehicle* vehicle = Game_Map::GetVehicle(vehicle_id);

Expand All @@ -3834,11 +3834,11 @@ namespace EvalCondBranch {
return interpreter.GetFrame().triggered_by_decision_key;
}

bool BgmLoopedOnce(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool BgmLoopedOnce(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {

Check warning on line 3837 in src/game_interpreter.cpp

View workflow job for this annotation

GitHub Actions / ubuntu:22.04

unused parameter 'com' [-Wunused-parameter]

Check warning on line 3837 in src/game_interpreter.cpp

View workflow job for this annotation

GitHub Actions / debian:12

unused parameter 'com' [-Wunused-parameter]
return game_system->BgmPlayedOnce();
}

bool Timer2(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool Timer2(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
int value1 = game_party->GetTimerSeconds(game_party->Timer2);
int value2 = com.parameters[1];
switch (com.parameters[2]) {
Expand All @@ -3850,7 +3850,7 @@ namespace EvalCondBranch {
return false;
}

bool Other(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool Other(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
switch (com.parameters[1]) {
case 0:
// Any savestate available
Expand All @@ -3868,7 +3868,7 @@ namespace EvalCondBranch {
return false;
}

bool ManiacsOther(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool ManiacsOther(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
switch (com.parameters[1]) {
case 0:
return game_system->IsLoadedThisFrame();
Expand All @@ -3888,7 +3888,7 @@ namespace EvalCondBranch {
return false;
}

bool ManiacsSwitchIndirect(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool ManiacsSwitchIndirect(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
return game_switches->Get(game_variables->Get(com.parameters[1])) == (com.parameters[2] == 0);;
}

Expand All @@ -3898,7 +3898,7 @@ namespace EvalCondBranch {
return Game_Interpreter_Shared::CheckOperator(value1, value2, com.parameters[4]);
}

bool ManiacsStringComparison(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& interpreter) {
bool ManiacsStringComparison(lcf::rpg::EventCommand const& com, Game_BaseInterpreterContext const& /*interpreter*/) {
int modes[] = {
(com.parameters[1]) & 15, //str_l mode: 0 = direct, 1 = indirect
(com.parameters[1] >> 4) & 15, //str_r mode: 0 = literal, 1 = direct, 2 = indirect
Expand Down

0 comments on commit 08d33ab

Please # to comment.