On Sun, Feb 8, 2015 at 2:26 PM, Matt Turner <matts...@gmail.com> wrote:
> On Sun, Feb 8, 2015 at 1:00 AM, Ilia Mirkin <imir...@alum.mit.edu> wrote:
>> @@ -886,6 +953,25 @@ ir_constant::get_float_component(unsigned i) const
>>     case GLSL_TYPE_INT:   return (float) this->value.i[i];
>>     case GLSL_TYPE_FLOAT: return this->value.f[i];
>>     case GLSL_TYPE_BOOL:  return this->value.b[i] ? 1.0f : 0.0f;
>> +   case GLSL_TYPE_DOUBLE: return (float) this->value.d[i];
>> +   default:              assert(!"Should not get here."); break;
>> +   }
>> +
>> +   /* Must return something to make the compiler happy.  This is clearly an
>> +    * error case.
>> +    */
>> +   return 0.0;
>
> Use unreachable() here.

diff made a funky (but understandable) decision here. That code was
actually already there. However the exact same thing is added to the
(new) get_double_component function. I think it's more important to
have symmetry there so that it can all be cleaned up later rather than
someone wondering "why are these nearly identical functions
different".

  -ilia
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to