aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-02 20:46:11 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-02 20:46:11 +0100
commitb59afa621a5af35cdd5a07416efa79a230ae096f (patch)
treefdb17fc7c33be64760845d8ace849e3659435091
parentbd36b0b4725174db95f7e6081a3cd3a6008f1543 (diff)
downloadvis-b59afa621a5af35cdd5a07416efa79a230ae096f.tar.gz
vis-b59afa621a5af35cdd5a07416efa79a230ae096f.tar.xz
map: remove unused function
-rw-r--r--map.c13
-rw-r--r--map.h2
2 files changed, 0 insertions, 15 deletions
diff --git a/map.c b/map.c
index 94e941c..c69bd70 100644
--- a/map.c
+++ b/map.c
@@ -301,19 +301,6 @@ const Map *map_prefix(const Map *map, const char *prefix)
return top;
}
-bool map_prefix_delete(Map *map, const char *prefix)
-{
- bool ret = false;
- do {
- const char *conflict = NULL;
- const Map *conflicts = map_prefix(map, prefix);
- if (!map_first(conflicts, &conflict))
- break;
- ret = map_delete(map, conflict);
- } while (ret);
- return ret;
-}
-
static void clear(Map n)
{
if (!n.v) {
diff --git a/map.h b/map.h
index c9690ad..d4ea992 100644
--- a/map.h
+++ b/map.h
@@ -34,8 +34,6 @@ void map_iterate(const Map*, bool (*handle)(const char *key, void *value, void *
/* Return a submap matching a prefix. This returns a pointer into the
* original map, so don't alter the map while using the return value. */
const Map *map_prefix(const Map*, const char *prefix);
-/* Delete all entries of the prefix map */
-bool map_prefix_delete(Map*, const char *prefix);
/* Test whether the map is empty i.e. contains no elements */
bool map_empty(const Map*);
/* Remove every member from the map. The map will be empty after this. */