summaryrefslogtreecommitdiff
path: root/src/analysis/db/items/comment.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-09-29 21:57:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-09-29 21:57:42 (GMT)
commitc434b8ccaae01810903e098ad8e66f8ead3141eb (patch)
tree9d0938011c37af7e297183e65b653360bcfaf315 /src/analysis/db/items/comment.c
parent3a83a06db8ee27eafcd0219d1d26bf2af23737f5 (diff)
Removed useless features from DB collections.
Diffstat (limited to 'src/analysis/db/items/comment.c')
-rw-r--r--src/analysis/db/items/comment.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c
index 39aeb69..47ab5b3 100644
--- a/src/analysis/db/items/comment.c
+++ b/src/analysis/db/items/comment.c
@@ -183,9 +183,6 @@ static void g_comment_collection_finalize(GCommentCollection *);
/* Crée la table des commentaires dans une base de données. */
static bool g_comment_collection_create_db_table(const GCommentCollection *, sqlite3 *);
-/* Détermine si un élément est déjà présent ou non. */
-static GDbItem *g_comment_collection_has_key(GCommentCollection *, va_list);
-
/* ---------------------------------------------------------------------------------- */
@@ -1511,7 +1508,6 @@ static void g_comment_collection_class_init(GCommentCollectionClass *klass)
collec = G_DB_COLLECTION_CLASS(klass);
collec->create_table = (collec_create_db_table_fc)g_comment_collection_create_db_table;
- collec->has_key = (collec_has_key_fc)g_comment_collection_has_key;
}
@@ -1646,52 +1642,3 @@ static bool g_comment_collection_create_db_table(const GCommentCollection *colle
return (ret == SQLITE_OK);
}
-
-
-/******************************************************************************
-* *
-* Paramètres : collec = ensemble d'éléments à consulter. *
-* ap = clef identifiant de manière unique un élément. *
-* *
-* Description : Détermine si un élément est déjà présent ou non. *
-* *
-* Retour : Elément trouvé ou NULL si aucun. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static GDbItem *g_comment_collection_has_key(GCommentCollection *collec, va_list ap)
-{
- GDbItem *result; /* Bilan à retourner */
- vmpa2t *ref; /* Adresse de référence */
- GList *items; /* Eléments déjà en place */
- GList *iter; /* Boucle de parcours */
- GDbComment *bm; /* Signet à consulter */
-
- result = NULL;
-
- ref = va_arg(ap, vmpa2t *);
-
-#if 0
- items = g_db_collection_get_items(G_DB_COLLECTION(collec));
-
- for (iter = g_list_first(items); iter != NULL && result == NULL; iter = g_list_next(iter))
- {
- bm = G_DB_COMMENT(iter->data);
-
- if (cmp_vmpa(&bm->addr, ref) != 0)
-
- /**
- * Un verrou est sensé être posé, donc il n'y a pas besoin
- * de toucher au décompte des références car l'élément trouvé
- * ne peut pas être supprimé.
- */
- result = G_DB_ITEM(bm);
-
- }
-#endif
-
- return result;
-
-}