Skip to content

Commit

Permalink
Fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed Jan 8, 2025
1 parent 1522d18 commit ee9f194
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/audio_midi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ std::unique_ptr<AudioDecoderBase> MidiDecoder::CreateFluidsynth(bool resample) {
if (mididec && resample) {
mididec = std::make_unique<AudioResampler>(std::move(mididec));
}
#else
(void)resample;
#endif

return mididec;
Expand All @@ -107,6 +109,8 @@ std::unique_ptr<AudioDecoderBase> MidiDecoder::CreateWildMidi(bool resample) {
if (mididec && resample) {
mididec = std::make_unique<AudioResampler>(std::move(mididec));
}
#else
(void)resample;
#endif

return mididec;
Expand All @@ -126,6 +130,8 @@ std::unique_ptr<AudioDecoderBase> MidiDecoder::CreateFmMidi(bool resample) {
if (mididec && resample) {
mididec = std::make_unique<AudioResampler>(std::move(mididec));
}
#else
(void)resample;
#endif

return mididec;
Expand All @@ -152,6 +158,8 @@ void MidiDecoder::ChangeFluidsynthSoundfont(StringView sf_path) {
// Was initialized before
works.fluidsynth = FluidSynthDecoder::ChangeGlobalSoundfont(sf_path, works.fluidsynth_status);
Output::Debug("Fluidsynth: {}", works.fluidsynth_status);
#else
(void)sf_path;
#endif
}

Expand Down
3 changes: 3 additions & 0 deletions src/game_battlealgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ Game_BattleAlgorithm::AlgorithmBase::AlgorithmBase(Type ty, Game_Battler* source
type(ty), source(source), targets(std::move(in_targets))
{
assert(source != nullptr);

#ifndef NDEBUG
for (auto* t: targets) {
assert(t != nullptr);
}
#endif

Reset();

Expand Down
1 change: 1 addition & 0 deletions src/platform/sdl/sdl2_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,7 @@ bool Sdl2Ui::OpenURL(StringView url) {

return true;
#else
(void)url;
Output::Warning("Cannot Open URL: SDL2 version too old (must be 2.0.14)");
return false;
#endif
Expand Down
3 changes: 1 addition & 2 deletions src/scene_battle_rpg2k3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1739,8 +1739,7 @@ Scene_Battle_Rpg2k3::SceneActionReturn Scene_Battle_Rpg2k3::ProcessSceneActionBa
return SceneActionReturn::eWaitTillNextFrame;
}

auto* battler = pending_battle_action->GetSource();
assert(battler != active_actor);
assert(pending_battle_action->GetSource() != active_actor);

pending_battle_action = {};
RemoveCurrentAction();
Expand Down

0 comments on commit ee9f194

Please sign in to comment.