mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-15 21:45:54 +01:00
Fixed floating point constants defined as double but expected as float
To preserve the accuracy of the operation, the C standard request that the mathematical operation is performed using double precision, but in many case this is not necessary so this patch fixes a few constants to avoid that conversion. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
1df08cc492
commit
79a95d7173
@@ -438,7 +438,7 @@ static void gatherconfig(RContext * context, int screen_n)
|
||||
ptr = mygetenv("WRASTER_GAMMA", screen_n);
|
||||
if (ptr) {
|
||||
float g1, g2, g3;
|
||||
if (sscanf(ptr, "%f/%f/%f", &g1, &g2, &g3) != 3 || g1 <= 0.0 || g2 <= 0.0 || g3 <= 0.0) {
|
||||
if (sscanf(ptr, "%f/%f/%f", &g1, &g2, &g3) != 3 || g1 <= 0.0F || g2 <= 0.0F || g3 <= 0.0F) {
|
||||
printf("wrlib: invalid value(s) for gamma correction \"%s\"\n", ptr);
|
||||
} else {
|
||||
context->attribs->flags |= RC_GammaCorrection;
|
||||
|
||||
Reference in New Issue
Block a user