mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-06 00:50:34 +02:00
Added some explicit conversion to double precision
When the result of the operation is expected to use double precision, this patchs adds an explicit conversion to that type to tell the compiler that this is what we want, and not an unexpected side effect. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
1 parent
79a95d7173
commit
d28edde23e
3 files changed
+3
-3
No files matched your search
@@ -591,7 +591,7 @@ void WMSetUDFloatForKey(WMUserDefaults * database, float value, const char *defa
|
||||
WMPropList *object;
|
||||
char buffer[128];
|
||||
|
||||
sprintf(buffer, "%f", value);
|
||||
sprintf(buffer, "%f", (double)value);
|
||||
object = WMCreatePLString(buffer);
|
||||
|
||||
WMSetUDObjectForKey(database, object, defaultName);
|
||||
|
||||
+1
-1
@@ -565,7 +565,7 @@ static void scrollCallback(WMWidget * scroller, void *self)
|
||||
|
||||
floatValue = (floatValue * value) / value;
|
||||
|
||||
newFirst = rint(floatValue * (float)(bPtr->columnCount - bPtr->maxVisibleColumns));
|
||||
newFirst = rint(floatValue * (double)(bPtr->columnCount - bPtr->maxVisibleColumns));
|
||||
|
||||
if (bPtr->firstVisibleColumn != newFirst)
|
||||
scrollToColumn(bPtr, newFirst, False);
|
||||
|
||||
@@ -301,7 +301,7 @@ static void showData(_Panel * panel)
|
||||
WMSetSliderValue(panel->speedS, (accel - 0.25F) / 0.25F);
|
||||
|
||||
panel->acceleration = accel;
|
||||
sprintf(buffer, "%.2f", accel);
|
||||
sprintf(buffer, "%.2f", (double)accel);
|
||||
WMSetTextFieldText(panel->acceT, buffer);
|
||||
|
||||
/**/ b = GetIntegerForKey("DoubleClickTime");
|
||||
|
||||
Reference in new issue
Block a user