Skip to content

Commit

Permalink
map: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Feb 2, 2017
1 parent bd36b0b commit b59afa6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
13 changes: 0 additions & 13 deletions map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions map.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit b59afa6

Please sign in to comment.