From 721cc304780cf10fdbd25d35e3b2eca22cae3daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Thu, 16 Dec 2010 05:18:41 +0100 Subject: Overall cleanup. * Add missing asserts to exported functions. * Unify formatting. * Fix the gtk-doc comment for ld_symbol_category_set_human_name(). * Make ld_library_load() reflect it's declaration. * Remove an unused variable in ld_library_load_cb(). * Change all char's to gchar's. --- src/ld-library.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/ld-library.c') diff --git a/src/ld-library.c b/src/ld-library.c index 2bd0365..4c980d0 100644 --- a/src/ld-library.c +++ b/src/ld-library.c @@ -43,11 +43,10 @@ struct _LdLibraryPrivate G_DEFINE_TYPE (LdLibrary, ld_library, G_TYPE_OBJECT); -static void -ld_library_finalize (GObject *gobject); +static void ld_library_finalize (GObject *gobject); -static LdSymbolCategory *load_category - (LdLibrary *self, const char *path, const char *name); +static LdSymbolCategory *load_category (LdLibrary *self, + const gchar *path, const gchar *name); static gboolean load_category_cb (const gchar *base, const gchar *filename, gpointer userdata); static void load_category_symbol_cb (LdSymbol *symbol, gpointer user_data); @@ -175,7 +174,7 @@ LoadCategoryData; * Loads a category into the library. */ static LdSymbolCategory * -load_category (LdLibrary *self, const char *path, const char *name) +load_category (LdLibrary *self, const gchar *path, const gchar *name) { LdSymbolCategory *cat; gchar *icon_file, *category_file; @@ -353,16 +352,16 @@ LibraryLoadData; * Load the contents of a directory into the library. */ gboolean -ld_library_load (LdLibrary *self, const char *path) +ld_library_load (LdLibrary *self, const gchar *directory) { LibraryLoadData data; g_return_val_if_fail (LD_IS_LIBRARY (self), FALSE); - g_return_val_if_fail (path != NULL, FALSE); + g_return_val_if_fail (directory != NULL, FALSE); data.self = self; data.changed = FALSE; - foreach_dir (path, ld_library_load_cb, &data, NULL); + foreach_dir (directory, ld_library_load_cb, &data, NULL); if (data.changed) g_signal_emit (self, LD_LIBRARY_GET_CLASS (self)->changed_signal, 0); @@ -379,7 +378,6 @@ static gboolean ld_library_load_cb (const gchar *base, const gchar *filename, gpointer userdata) { LdSymbolCategory *cat; - gchar *categ_path; LibraryLoadData *data; g_return_val_if_fail (base != NULL, FALSE); -- cgit v1.2.3