[PATCH 2/9] Introduce and use language_set

John Baldwin jhb@FreeBSD.org
Fri Mar 8 23:44:00 GMT 2019


On 3/8/19 2:43 PM, Tom Tromey wrote:
> John> Hmm, did you consider using std::bitset<nr_languages> for langauge_set?  You'd
> John> still have to write your own iterator class, so it wouldn't save much in terms
> John> of lines of code.
> 
> In this case, because there are just two spots that iterate over this
> set, and because we'd need to introduce somewhat ugly casts back to
> "enum language" anyway, it seemed just as good to not write an iterator
> and just do this in a simpler way.

Looks good to me.

-- 
John Baldwin



More information about the Gdb-patches mailing list