diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2019-09-29 21:27:03 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2019-09-29 21:27:03 (GMT) | 
| commit | 3a83a06db8ee27eafcd0219d1d26bf2af23737f5 (patch) | |
| tree | 163ea7fbe1435b9f380e7ae96dfc36d8f16d1d0a /src/analysis/db/items/bookmark.c | |
| parent | 55bc8570f25a479b222733c4093f9ae996c9f68e (diff) | |
Cleaned the DB code a little bit.
Diffstat (limited to 'src/analysis/db/items/bookmark.c')
| -rw-r--r-- | src/analysis/db/items/bookmark.c | 17 | 
1 files changed, 6 insertions, 11 deletions
| diff --git a/src/analysis/db/items/bookmark.c b/src/analysis/db/items/bookmark.c index c1b0fec..8c15e5a 100644 --- a/src/analysis/db/items/bookmark.c +++ b/src/analysis/db/items/bookmark.c @@ -80,7 +80,7 @@ static guint g_db_bookmark_hash_key(const GDbBookmark *);  static gboolean g_db_bookmark_cmp_key(const GDbBookmark *, const GDbBookmark *);  /* Effectue la comparaison entre deux signets de collection. */ -static gint g_db_bookmark_cmp(GDbBookmark *, GDbBookmark *, bool); +static gint g_db_bookmark_cmp(const GDbBookmark *, const GDbBookmark *);  /* Importe la définition d'un signet dans un flux réseau. */  static bool g_db_bookmark_unpack(GDbBookmark *, packed_buffer *); @@ -89,7 +89,7 @@ static bool g_db_bookmark_unpack(GDbBookmark *, packed_buffer *);  static bool g_db_bookmark_pack(const GDbBookmark *, packed_buffer *);  /* Construit la description humaine d'un signet sur un tampon. */ -static char *g_db_bookmark_build_label(GDbBookmark *); +static char *g_db_bookmark_build_label(const GDbBookmark *);  /* Exécute un signet sur un tampon de binaire chargé. */  static bool g_db_bookmark_run(GDbBookmark *, GLoadedBinary *, bool *, bool); @@ -183,7 +183,6 @@ static void g_db_bookmark_class_init(GDbBookmarkClass *klass)      item->hash_key = (hash_db_item_key_fc)g_db_bookmark_hash_key;      item->cmp_key = (cmp_db_item_key_fc)g_db_bookmark_cmp_key; -      item->cmp = (cmp_db_item_fc)g_db_bookmark_cmp;      item->unpack = (unpack_db_item_fc)g_db_bookmark_unpack; @@ -375,9 +374,8 @@ static gboolean g_db_bookmark_cmp_key(const GDbBookmark *a, const GDbBookmark *b  /******************************************************************************  *                                                                             * -*  Paramètres  : a    = premier élément à analyser.                           * -*                b    = second élément à analyser.                            * -*                with = précise les horodatages à prendre en compte.          * +*  Paramètres  : a = premier élément à analyser.                              * +*                b = second élément à analyser.                               *  *                                                                             *  *  Description : Effectue la comparaison entre deux signets de collection.    *  *                                                                             * @@ -387,7 +385,7 @@ static gboolean g_db_bookmark_cmp_key(const GDbBookmark *a, const GDbBookmark *b  *                                                                             *  ******************************************************************************/ -static gint g_db_bookmark_cmp(GDbBookmark *a, GDbBookmark *b, bool with) +static gint g_db_bookmark_cmp(const GDbBookmark *a, const GDbBookmark *b)  {      gint result;                            /* Bilan de la comparaison     */ @@ -396,9 +394,6 @@ static gint g_db_bookmark_cmp(GDbBookmark *a, GDbBookmark *b, bool with)      if (result == 0)          result = cmp_rle_string(&a->comment, &b->comment); -    if (result == 0) -        result = G_DB_ITEM_CLASS(g_db_bookmark_parent_class)->cmp(G_DB_ITEM(a), G_DB_ITEM(b), with); -      return result;  } @@ -476,7 +471,7 @@ static bool g_db_bookmark_pack(const GDbBookmark *bookmark, packed_buffer *pbuf)  *                                                                             *  ******************************************************************************/ -static char *g_db_bookmark_build_label(GDbBookmark *bookmark) +static char *g_db_bookmark_build_label(const GDbBookmark *bookmark)  {      char *result;                           /* Description à retourner     */      DbItemFlags flags;                      /* Propriétés de l'élément     */ | 
