[Mesa-dev] [PATCH v2 12/15] nv50/ir: optimize the use of std::tr1::unordered_set

Chih-Wei Huang cwhuang at android-x86.org
Wed May 20 19:18:24 PDT 2015

2015-05-20 16:35 GMT+08:00 Petri Latvala <petri.latvala at intel.com>:
> On 05/20/2015 06:30 AM, Ilia Mirkin wrote:
>> +    typedef const iterator const_iterator;
>> +
> This at least is wrong. A const iterator allows *iter = val, a
> const_iterator doesn't. A const_iterator allows ++, a const iterator
> doesn't.

You're right. Thank you!
The const_iterator should be derived from _base::const_iterator.

After review the code again, the unordered_set::const_iterator is not
used except in Value::UseCIterator, but the latter is not used, either.
So I think it's safe to remove it at all.

Android-x86 project

More information about the mesa-dev mailing list