glsl: add 'f' suffix to floats to silence MSVC warnings
authorBrian Paul <brianp@vmware.com>
Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 6 Nov 2012 14:42:37 +0000 (07:42 -0700)
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/glsl/ir.cpp

index 1c7aadacabf2a3bd99c7554301034659f726d69b..7b0a487b6fc6c5b976f8be6246bb9260a6eb706e 100644 (file)
@@ -780,7 +780,7 @@ ir_constant::get_float_component(unsigned i) const
    case GLSL_TYPE_UINT:  return (float) this->value.u[i];
    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.0 : 0.0;
+   case GLSL_TYPE_BOOL:  return this->value.b[i] ? 1.0f : 0.0f;
    default:              assert(!"Should not get here."); break;
    }