[gnome-chess] Use namespace instead of class for BitBoard
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Use namespace instead of class for BitBoard
- Date: Thu, 28 Jul 2016 04:39:27 +0000 (UTC)
commit cff0c343e53ade1c9d7442fd6e1d027eefc53572
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Jul 27 23:36:03 2016 -0500
Use namespace instead of class for BitBoard
This class contains only constants and static functions, so generating a
ton of GObject code here for an object that never gets instantiated is
way overkill. Use namespace instead of class to clarify this.
lib/chess-bitboard.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/chess-bitboard.vala b/lib/chess-bitboard.vala
index 517650f..25042c3 100644
--- a/lib/chess-bitboard.vala
+++ b/lib/chess-bitboard.vala
@@ -9,7 +9,7 @@
* license.
*/
-public class BitBoard : Object
+namespace BitBoard
{
/* Bitboard for each location */
public const int64 set_location_masks[] =
@@ -1291,7 +1291,7 @@ public class BitBoard : Object
0x6c38000000000000, 0x5070000000000000, 0xa0e0000000000000, 0x40c0000000000000
};
- public static string to_string (int64 mask)
+ public string to_string (int64 mask)
{
var string = "+---+---+---+---+---+---+---+---+\n";
int rowCount = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]