[Mesa-dev] [PATCH 7/8] vbo: silence MSVC double/float conversion warnings

Brian Paul brianp at vmware.com
Sat Oct 27 07:59:29 PDT 2012


---
 src/mesa/vbo/vbo_attrib_tmp.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index d3fc77e..ece9394 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -61,12 +61,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 static inline float conv_ui10_to_norm_float(unsigned ui10)
 {
-   return (float)(ui10) / 1023.0;
+   return (float)(ui10) / 1023.0f;
 }
 
 static inline float conv_ui2_to_norm_float(unsigned ui2)
 {
-   return (float)(ui2) / 3.0;
+   return (float)(ui2) / 3.0f;
 }
 
 #define ATTRUI10_1( A, UI ) ATTR( A, 1, (UI) & 0x3ff, 0, 0, 1 )
-- 
1.7.3.4



More information about the mesa-dev mailing list