util/set: Add a search_and_add function
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 10 May 2019 18:37:42 +0000 (13:37 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Mon, 13 May 2019 14:43:47 +0000 (14:43 +0000)
commitabb450870e8a8fc590e53b21f3ff2a4db42536dd
treeba8b324acb026e26a8f2f61a0c996232040a3f65
parent460567eabf735003059ed24068d21b159d309896
util/set: Add a search_and_add function

This function is identical to _mesa_set_add except that it takes an
extra out parameter that lets the caller detect if a replacement
happened.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
src/util/set.c
src/util/set.h