[iagno] Return value that didn't make sense.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] Return value that didn't make sense.
- Date: Mon, 15 Sep 2014 22:22:30 +0000 (UTC)
commit 674ef431ab8773d551eb3f876ec2786641da0772
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Aug 29 23:58:32 2014 +0200
Return value that didn't make sense.
https://bugzilla.gnome.org/show_bug.cgi?id=735615
src/game.vala | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index 5f58f07..ec5d3ea 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -104,11 +104,9 @@ public class Game : Object
}
public Player get_owner (int x, int y)
+ requires (is_valid_location (x, y))
{
- if (is_valid_location (x, y))
- return tiles[x, y];
- else
- return Player.NONE;
+ return tiles[x, y];
}
public bool is_complete ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]