|
From: Lasse Kärkkäi. <tr...@us...> - 2010-09-14 22:08:53
|
Module: performous Branch: master Commit: e0e5bbd1a0a5eca3890041917344e1713bb93e81 Author: Lasse Karkkainen <tro...@tr...> Date: Mon Sep 6 21:18:46 2010 +0300 Minor cleanup of a confusing control structure into a confusing short-circuit structure + a clarifying comment. --- game/guitargraph.cc | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/game/guitargraph.cc b/game/guitargraph.cc index 9e81b4f..e05670e 100644 --- a/game/guitargraph.cc +++ b/game/guitargraph.cc @@ -125,12 +125,12 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number, m_track_index = m_instrumentTracks.begin(); while (number--) if (++m_track_index == m_instrumentTracks.end()) m_track_index = m_instrumentTracks.begin(); - // Pick a nice default difficulty - if (difficulty(DIFFICULTY_EASY)); - else if (difficulty(DIFFICULTY_SUPAEASY)); - else if (difficulty(DIFFICULTY_MEDIUM)); - else if (difficulty(DIFFICULTY_AMAZING)); - else difficultyAuto(); + // Pick a nice default difficulty (note: the execution of || stops when true is returned) + difficulty(DIFFICULTY_EASY) || + difficulty(DIFFICULTY_SUPAEASY) || + difficulty(DIFFICULTY_MEDIUM) || + difficulty(DIFFICULTY_AMAZING) || + (difficultyAuto(), true); updateNeck(); setupJoinMenu(); } |