[libgames-support] Simplify implementation of add_score
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgames-support] Simplify implementation of add_score
- Date: Sun, 14 Feb 2016 22:01:01 +0000 (UTC)
commit 7a050fb71ea8771dd5fecb81a9cedb3dcd80e8b1
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sun Feb 14 15:31:21 2016 -0600
Simplify implementation of add_score
games/scores/context.vala | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/games/scores/context.vala b/games/scores/context.vala
index 13864f7..d4815f2 100644
--- a/games/scores/context.vala
+++ b/games/scores/context.vala
@@ -228,12 +228,10 @@ public class Context : Object
}
/* Return true if a dialog was launched on attaining high score */
- public async bool add_score (long score_value, Category category, Cancellable? cancellable) throws Error
+ public async bool add_score (long score, Category category, Cancellable? cancellable) throws Error
{
- var score = new Score (score_value);
-
/* Don't allow the dialog if it wouldn't have a parent, or in tests. */
- return yield add_score_internal (score, category, game_window != null, cancellable);
+ return yield add_score_internal (new Score (score), category, game_window != null, cancellable);
}
internal bool add_score_sync (Score score, Category category) throws Error
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]