]> git.tue.mpg.de Git - paraslash.git/commitdiff
mood: Don't open-code compute_dynamic_score().
authorAndre Noll <maan@systemlinux.org>
Wed, 4 Sep 2013 19:24:15 +0000 (19:24 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 13 Oct 2013 13:25:06 +0000 (15:25 +0200)
compute_dynamic_score() adds the two values for the numplayed and the
lasteplayed score. No need to duplicate this code here.

mood.c

diff --git a/mood.c b/mood.c
index 465a48e4efd1df830ac6dff59503e7259f9215f7..db5d8afc6d13c6ecb892545844ae0c45ee469dd2 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -755,8 +755,7 @@ static int mood_update_audio_file(const struct osl_row *aft_row,
                if (ret < 0)
                        return ret;
        }
-       score += compute_num_played_score(&afsi);
-       score += compute_last_played_score(&afsi);
+       score += compute_dynamic_score(&afsi);
        score /= 3;
        PARA_DEBUG_LOG("score: %li\n", score);
        percent = (score + 100) / 3;