gnome-games r8543 - trunk/libgames-support



Author: chpe
Date: Sat Jan 10 15:35:30 2009
New Revision: 8543
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8543&view=rev

Log:
Minor code & style cleanup.

Modified:
   trunk/libgames-support/games-score.c
   trunk/libgames-support/games-score.h

Modified: trunk/libgames-support/games-score.c
==============================================================================
--- trunk/libgames-support/games-score.c	(original)
+++ trunk/libgames-support/games-score.c	Sat Jan 10 15:35:30 2009
@@ -1,5 +1,4 @@
-/* games-score.c 
- *
+/*
  * Copyright (C) 2005 Callum McKenzie
  *
  * This library is free software; you can redistribute it and/or
@@ -18,9 +17,6 @@
  * Boston, MA 02111-1307, USA.
  */
 
-/* We don't make it a proper object, basically to reduce overhead (system
-   memory and programmers time) */
-
 #include <config.h>
 
 #include "games-score.h"
@@ -61,9 +57,7 @@
 void
 games_score_destroy (GamesScore * score)
 {
-  if (score->name)
-    g_free (score->name);
-
+  g_free (score->name);
   g_slice_free (GamesScore, score);
 }
 

Modified: trunk/libgames-support/games-score.h
==============================================================================
--- trunk/libgames-support/games-score.h	(original)
+++ trunk/libgames-support/games-score.h	Sat Jan 10 15:35:30 2009
@@ -1,5 +1,4 @@
-/* games-score.h
- *
+/*
  * Copyright (C) 2005 Callum McKenzie
  *
  * This library is free software; you can redistribute it and/or
@@ -25,8 +24,9 @@
 #include <time.h>
 
 G_BEGIN_DECLS
+
 /* GamesScore and GamesScoresStyle should be kept in sync. */
-  typedef enum {
+typedef enum {
   GAMES_SCORES_STYLE_PLAIN_DESCENDING,
   GAMES_SCORES_STYLE_PLAIN_ASCENDING,
   GAMES_SCORES_STYLE_TIME_DESCENDING,
@@ -53,4 +53,5 @@
 void games_score_destroy (GamesScore * score);
 
 G_END_DECLS
+
 #endif /* GAMES_SCORE_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]