On Sat, Mar 30, 2013 at 10:05 AM, Vincent van Ravesteijn <v...@lyx.org> wrote:
> Op 30-3-2013 6:08, Scott Kostyshak schreef:
>>
>> +                       // Search for an explicit name
>>
>> +                       bool foundMatch = false;
>> +                       for (int i = 0 ; i < numErrorTags ; ++i)
>> +                               if (tmp == errorTags[i].name) {
>> +                                       foundMatch = true;
>> +                                       l |= errorTags[i].level;
>> +                                       break;
>> +                               }
>> +                       if (!foundMatch) {
>
>
> could be replaced by (but I don't know what others prefer):
>
>
> +                       // Search for an explicit name
> +                       int i = 0;
> +                       for (; i < numErrorTags; ++i) {
>
> +                               if (tmp == errorTags[i].name) {
> +                                       l |= errorTags[i].level;
> +                                       break;
> +                               }
> +                       }
> +                       if (i == numErrorTags) {

I did something a little different in the patch that I attached to the
last email. I did not use the bool that I used in the first version
because I give the error immediately on the unknown value. I did not
do your suggestion because I think it's good for the error to say
which debug flag is the one that is not valid. If you disagree, I
don't mind at all implementing your suggestion.

Thanks, Scott

Reply via email to