Mesa (master): util: initialize float-array with float-literals
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 14 11:18:56 UTC 2020
Module: Mesa
Branch: master
Commit: d5c0fbfd7896a8f1fb07272188388763e3fed275
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d5c0fbfd7896a8f1fb07272188388763e3fed275
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Fri Sep 20 16:04:06 2019 +0200
util: initialize float-array with float-literals
We currently initialize this float-array with double-literals. Some
compilers generate warnings for this, so let's switch these to
float-literals instead.
Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/util/format_srgb.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/format_srgb.py b/src/util/format_srgb.py
index 0b3b5611fc9..98fa1c48cf3 100644
--- a/src/util/format_srgb.py
+++ b/src/util/format_srgb.py
@@ -62,7 +62,7 @@ def generate_srgb_tables():
print('util_format_srgb_8unorm_to_linear_float_table[256] = {')
for j in range(0, 256, 4):
print(' ', end=' ')
- print(' '.join(['%.7e,' % srgb_to_linear(i / 255.0) for i in range(j, j + 4)]))
+ print(' '.join(['%.7ef,' % srgb_to_linear(i / 255.0) for i in range(j, j + 4)]))
print('};')
print()
print('const uint8_t')
More information about the mesa-commit
mailing list