[easytag] Remove unnecessary et_file_tag_init()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Remove unnecessary et_file_tag_init()
- Date: Mon, 5 Jan 2015 00:22:01 +0000 (UTC)
commit c2d9b91f88f0255d4f54d48b1f108d7675c1ec56
Author: David King <amigadave amigadave com>
Date: Sun Jan 4 21:58:57 2015 +0000
Remove unnecessary et_file_tag_init()
Use g_slice_new0() to zero-initialize the File_Tag struct, and do away
with the separate function.
src/file_tag.c | 38 +++++---------------------------------
1 files changed, 5 insertions(+), 33 deletions(-)
---
diff --git a/src/file_tag.c b/src/file_tag.c
index 9215ffd..c707a83 100644
--- a/src/file_tag.c
+++ b/src/file_tag.c
@@ -20,46 +20,18 @@
#include "et_core.h"
-static void
-et_file_tag_init (File_Tag *FileTag)
-{
- if (FileTag)
- {
- FileTag->key = ET_Undo_Key_New();
- FileTag->saved = FALSE;
- FileTag->title = NULL;
- FileTag->artist = NULL;
- FileTag->album_artist= NULL;
- FileTag->album = NULL;
- FileTag->disc_number = NULL;
- FileTag->disc_total = NULL;
- FileTag->track = NULL;
- FileTag->track_total = NULL;
- FileTag->year = NULL;
- FileTag->genre = NULL;
- FileTag->comment = NULL;
- FileTag->composer = NULL;
- FileTag->orig_artist = NULL;
- FileTag->copyright = NULL;
- FileTag->url = NULL;
- FileTag->encoded_by = NULL;
- FileTag->picture = NULL;
- FileTag->other = NULL;
- }
-}
-
/*
- * Create a new File_Tag structure
+ * Create a new File_Tag structure.
*/
File_Tag *
et_file_tag_new (void)
{
- File_Tag *FileTag;
+ File_Tag *file_tag;
- FileTag = g_slice_new (File_Tag);
- et_file_tag_init (FileTag);
+ file_tag = g_slice_new0 (File_Tag);
+ file_tag->key = ET_Undo_Key_New ();
- return FileTag;
+ return file_tag;
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]