summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-05-09 09:25:17 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-05-09 09:25:17 +0100
commitc323199f3c8332b5a3794e93a46007273c0451b9 (patch)
treef994e92ebff668d811249eb25bf2e53358aebf04
parente0cf299ae5a98b294700bc04651a018fb779d0fc (diff)
bin/elm: resolve float compare warnings
Summary: Depends on D11789 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11790
-rw-r--r--src/bin/elementary/config.c102
-rw-r--r--src/bin/elementary/elm_prefs_cc_parse.c4
-rw-r--r--src/bin/elementary/test_gesture_layer3.c6
-rw-r--r--src/bin/elementary/test_glview_manygears.c2
-rw-r--r--src/bin/elementary/test_map.c2
-rw-r--r--src/bin/elementary/test_photocam.c2
-rw-r--r--src/bin/elementary/test_tooltip.c2
7 files changed, 60 insertions, 60 deletions
diff --git a/src/bin/elementary/config.c b/src/bin/elementary/config.c
index 71309ecf2a..17d1376f54 100644
--- a/src/bin/elementary/config.c
+++ b/src/bin/elementary/config.c
@@ -213,7 +213,7 @@ bf_round(void *data EINA_UNUSED,
213 double v; 213 double v;
214 214
215 v = ((double)((int)(val * 10.0))) / 10.0; 215 v = ((double)((int)(val * 10.0))) / 10.0;
216 if (v != val) elm_slider_value_set(obj, v); 216 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
217} 217}
218 218
219static void 219static void
@@ -224,7 +224,7 @@ bf_change(void *data EINA_UNUSED,
224 double bf = elm_config_scroll_bounce_friction_get(); 224 double bf = elm_config_scroll_bounce_friction_get();
225 double val = elm_slider_value_get(obj); 225 double val = elm_slider_value_get(obj);
226 226
227 if (bf == val) return; 227 if (EINA_DBL_EQ(bf, val)) return;
228 elm_config_scroll_bounce_friction_set(val); 228 elm_config_scroll_bounce_friction_set(val);
229 elm_config_all_flush(); 229 elm_config_all_flush();
230} 230}
@@ -238,7 +238,7 @@ ps_round(void *data EINA_UNUSED,
238 double v; 238 double v;
239 239
240 v = ((double)((int)(val * 10.0))) / 10.0; 240 v = ((double)((int)(val * 10.0))) / 10.0;
241 if (v != val) elm_slider_value_set(obj, v); 241 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
242} 242}
243 243
244static void 244static void
@@ -249,7 +249,7 @@ ps_change(void *data EINA_UNUSED,
249 double ps = elm_config_scroll_page_scroll_friction_get(); 249 double ps = elm_config_scroll_page_scroll_friction_get();
250 double val = elm_slider_value_get(obj); 250 double val = elm_slider_value_get(obj);
251 251
252 if (ps == val) return; 252 if (EINA_DBL_EQ(ps, val)) return;
253 elm_config_scroll_page_scroll_friction_set(val); 253 elm_config_scroll_page_scroll_friction_set(val);
254 elm_config_all_flush(); 254 elm_config_all_flush();
255} 255}
@@ -263,7 +263,7 @@ bis_round(void *data EINA_UNUSED,
263 double v; 263 double v;
264 264
265 v = ((double)((int)(val * 10.0))) / 10.0; 265 v = ((double)((int)(val * 10.0))) / 10.0;
266 if (v != val) elm_slider_value_set(obj, v); 266 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
267} 267}
268 268
269static void 269static void
@@ -274,7 +274,7 @@ bis_change(void *data EINA_UNUSED,
274 double bis = elm_config_scroll_bring_in_scroll_friction_get(); 274 double bis = elm_config_scroll_bring_in_scroll_friction_get();
275 double val = elm_slider_value_get(obj); 275 double val = elm_slider_value_get(obj);
276 276
277 if (bis == val) return; 277 if (EINA_DBL_EQ(bis, val)) return;
278 elm_config_scroll_bring_in_scroll_friction_set(val); 278 elm_config_scroll_bring_in_scroll_friction_set(val);
279 elm_config_all_flush(); 279 elm_config_all_flush();
280} 280}
@@ -288,7 +288,7 @@ zf_round(void *data EINA_UNUSED,
288 double v; 288 double v;
289 289
290 v = ((double)((int)(val * 10.0))) / 10.0; 290 v = ((double)((int)(val * 10.0))) / 10.0;
291 if (v != val) elm_slider_value_set(obj, v); 291 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
292} 292}
293 293
294static void 294static void
@@ -299,7 +299,7 @@ zf_change(void *data EINA_UNUSED,
299 double zf = elm_config_scroll_zoom_friction_get(); 299 double zf = elm_config_scroll_zoom_friction_get();
300 double val = elm_slider_value_get(obj); 300 double val = elm_slider_value_get(obj);
301 301
302 if (zf == val) return; 302 if (EINA_DBL_EQ(zf, val)) return;
303 elm_config_scroll_zoom_friction_set(val); 303 elm_config_scroll_zoom_friction_set(val);
304 elm_config_all_flush(); 304 elm_config_all_flush();
305} 305}
@@ -313,7 +313,7 @@ smooth_round(void *data EINA_UNUSED,
313 double v; 313 double v;
314 314
315 v = ((double)((int)(val * 100.0))) / 100.0; 315 v = ((double)((int)(val * 100.0))) / 100.0;
316 if (v != val) elm_slider_value_set(obj, v); 316 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
317} 317}
318 318
319static void 319static void
@@ -324,7 +324,7 @@ smooth_change(void *data EINA_UNUSED,
324 double zf = elm_config_scroll_thumbscroll_smooth_amount_get(); 324 double zf = elm_config_scroll_thumbscroll_smooth_amount_get();
325 double val = elm_slider_value_get(obj); 325 double val = elm_slider_value_get(obj);
326 326
327 if (zf == val) return; 327 if (EINA_DBL_EQ(zf, val)) return;
328 elm_config_scroll_thumbscroll_smooth_amount_set(val); 328 elm_config_scroll_thumbscroll_smooth_amount_set(val);
329 elm_config_all_flush(); 329 elm_config_all_flush();
330} 330}
@@ -338,7 +338,7 @@ smooth_win_round(void *data EINA_UNUSED,
338 double v; 338 double v;
339 339
340 v = ((double)((int)(val * 100.0))) / 100.0; 340 v = ((double)((int)(val * 100.0))) / 100.0;
341 if (v != val) elm_slider_value_set(obj, v); 341 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
342} 342}
343 343
344static void 344static void
@@ -349,7 +349,7 @@ smooth_win_change(void *data EINA_UNUSED,
349 double zf = elm_config_scroll_thumbscroll_smooth_time_window_get(); 349 double zf = elm_config_scroll_thumbscroll_smooth_time_window_get();
350 double val = elm_slider_value_get(obj); 350 double val = elm_slider_value_get(obj);
351 351
352 if (zf == val) return; 352 if (EINA_DBL_EQ(zf, val)) return;
353 elm_config_scroll_thumbscroll_smooth_time_window_set(val); 353 elm_config_scroll_thumbscroll_smooth_time_window_set(val);
354 elm_config_all_flush(); 354 elm_config_all_flush();
355} 355}
@@ -378,7 +378,7 @@ tst_round(void *data EINA_UNUSED,
378 double v; 378 double v;
379 379
380 v = ((double)((int)(val * 10.0))) / 10.0; 380 v = ((double)((int)(val * 10.0))) / 10.0;
381 if (v != val) elm_slider_value_set(obj, v); 381 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
382} 382}
383 383
384static void 384static void
@@ -389,7 +389,7 @@ tst_change(void *data EINA_UNUSED,
389 double tst = elm_config_scroll_thumbscroll_threshold_get(); 389 double tst = elm_config_scroll_thumbscroll_threshold_get();
390 double val = elm_slider_value_get(obj); 390 double val = elm_slider_value_get(obj);
391 391
392 if (tst == val) return; 392 if (EINA_DBL_EQ(tst, val)) return;
393 elm_config_scroll_thumbscroll_threshold_set(val); 393 elm_config_scroll_thumbscroll_threshold_set(val);
394 elm_config_all_flush(); 394 elm_config_all_flush();
395} 395}
@@ -403,7 +403,7 @@ tsht_round(void *data EINA_UNUSED,
403 double v; 403 double v;
404 404
405 v = ((double)((int)(val * 10.0))) / 10.0; 405 v = ((double)((int)(val * 10.0))) / 10.0;
406 if (v != val) elm_slider_value_set(obj, v); 406 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
407} 407}
408 408
409static void 409static void
@@ -414,7 +414,7 @@ tsht_change(void *data EINA_UNUSED,
414 double tst = elm_config_scroll_thumbscroll_hold_threshold_get(); 414 double tst = elm_config_scroll_thumbscroll_hold_threshold_get();
415 double val = elm_slider_value_get(obj); 415 double val = elm_slider_value_get(obj);
416 416
417 if (tst == val) return; 417 if (EINA_DBL_EQ(tst, val)) return;
418 elm_config_scroll_thumbscroll_hold_threshold_set(val); 418 elm_config_scroll_thumbscroll_hold_threshold_set(val);
419 elm_config_all_flush(); 419 elm_config_all_flush();
420} 420}
@@ -428,7 +428,7 @@ tsmt_round(void *data EINA_UNUSED,
428 double v; 428 double v;
429 429
430 v = ((double)((int)(val * 10.0))) / 10.0; 430 v = ((double)((int)(val * 10.0))) / 10.0;
431 if (v != val) elm_slider_value_set(obj, v); 431 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
432} 432}
433 433
434static void 434static void
@@ -439,7 +439,7 @@ tsmt_change(void *data EINA_UNUSED,
439 double tsmt = elm_config_scroll_thumbscroll_momentum_threshold_get(); 439 double tsmt = elm_config_scroll_thumbscroll_momentum_threshold_get();
440 double val = elm_slider_value_get(obj); 440 double val = elm_slider_value_get(obj);
441 441
442 if (tsmt == val) return; 442 if (EINA_DBL_EQ(tsmt, val)) return;
443 elm_config_scroll_thumbscroll_momentum_threshold_set(val); 443 elm_config_scroll_thumbscroll_momentum_threshold_set(val);
444 elm_config_all_flush(); 444 elm_config_all_flush();
445} 445}
@@ -453,7 +453,7 @@ tsfdt_round(void *data EINA_UNUSED,
453 double v; 453 double v;
454 454
455 v = ((double)((int)(val * 10.0))) / 10.0; 455 v = ((double)((int)(val * 10.0))) / 10.0;
456 if (v != val) elm_slider_value_set(obj, v); 456 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
457} 457}
458 458
459static void 459static void
@@ -464,7 +464,7 @@ tsfdt_change(void *data EINA_UNUSED,
464 double tsfdt = elm_config_scroll_thumbscroll_flick_distance_tolerance_get(); 464 double tsfdt = elm_config_scroll_thumbscroll_flick_distance_tolerance_get();
465 double val = elm_slider_value_get(obj); 465 double val = elm_slider_value_get(obj);
466 466
467 if (tsfdt == val) return; 467 if (EINA_DBL_EQ(tsfdt, val)) return;
468 elm_config_scroll_thumbscroll_flick_distance_tolerance_set(val); 468 elm_config_scroll_thumbscroll_flick_distance_tolerance_set(val);
469 elm_config_all_flush(); 469 elm_config_all_flush();
470} 470}
@@ -478,7 +478,7 @@ tsf_round(void *data EINA_UNUSED,
478 double v; 478 double v;
479 479
480 v = ((double)((int)(val * 10.0))) / 10.0; 480 v = ((double)((int)(val * 10.0))) / 10.0;
481 if (v != val) elm_slider_value_set(obj, v); 481 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
482} 482}
483 483
484static void 484static void
@@ -489,7 +489,7 @@ tsf_change(void *data EINA_UNUSED,
489 double tsf = elm_config_scroll_thumbscroll_friction_get(); 489 double tsf = elm_config_scroll_thumbscroll_friction_get();
490 double val = elm_slider_value_get(obj); 490 double val = elm_slider_value_get(obj);
491 491
492 if (tsf == val) return; 492 if (EINA_DBL_EQ(tsf, val)) return;
493 elm_config_scroll_thumbscroll_friction_set(val); 493 elm_config_scroll_thumbscroll_friction_set(val);
494 elm_config_all_flush(); 494 elm_config_all_flush();
495} 495}
@@ -503,7 +503,7 @@ tsmf_round(void *data EINA_UNUSED,
503 double v; 503 double v;
504 504
505 v = ((double)((int)(val * 10.0))) / 10.0; 505 v = ((double)((int)(val * 10.0))) / 10.0;
506 if (v != val) elm_slider_value_set(obj, v); 506 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
507} 507}
508 508
509static void 509static void
@@ -514,7 +514,7 @@ tsmf_change(void *data EINA_UNUSED,
514 double tsmf = elm_config_scroll_thumbscroll_min_friction_get(); 514 double tsmf = elm_config_scroll_thumbscroll_min_friction_get();
515 double val = elm_slider_value_get(obj); 515 double val = elm_slider_value_get(obj);
516 516
517 if (tsmf == val) return; 517 if (EINA_DBL_EQ(tsmf, val)) return;
518 elm_config_scroll_thumbscroll_min_friction_set(val); 518 elm_config_scroll_thumbscroll_min_friction_set(val);
519 elm_config_all_flush(); 519 elm_config_all_flush();
520} 520}
@@ -528,7 +528,7 @@ tsfs_round(void *data EINA_UNUSED,
528 double v; 528 double v;
529 529
530 v = ((double)((int)(val * 10.0))) / 10.0; 530 v = ((double)((int)(val * 10.0))) / 10.0;
531 if (v != val) elm_slider_value_set(obj, v); 531 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
532} 532}
533 533
534static void 534static void
@@ -539,7 +539,7 @@ tsfs_change(void *data EINA_UNUSED,
539 double tsfs = elm_config_scroll_thumbscroll_friction_standard_get(); 539 double tsfs = elm_config_scroll_thumbscroll_friction_standard_get();
540 double val = elm_slider_value_get(obj); 540 double val = elm_slider_value_get(obj);
541 541
542 if (tsfs == val) return; 542 if (EINA_DBL_EQ(tsfs, val)) return;
543 elm_config_scroll_thumbscroll_friction_standard_set(val); 543 elm_config_scroll_thumbscroll_friction_standard_set(val);
544 elm_config_all_flush(); 544 elm_config_all_flush();
545} 545}
@@ -553,7 +553,7 @@ tsbf_round(void *data EINA_UNUSED,
553 double v; 553 double v;
554 554
555 v = ((double)((int)(val * 10.0))) / 10.0; 555 v = ((double)((int)(val * 10.0))) / 10.0;
556 if (v != val) elm_slider_value_set(obj, v); 556 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
557} 557}
558 558
559static void 559static void
@@ -564,7 +564,7 @@ tsbf_change(void *data EINA_UNUSED,
564 double tsbf = elm_config_scroll_thumbscroll_border_friction_get(); 564 double tsbf = elm_config_scroll_thumbscroll_border_friction_get();
565 double val = elm_slider_value_get(obj); 565 double val = elm_slider_value_get(obj);
566 566
567 if (tsbf == val) return; 567 if (EINA_DBL_EQ(tsbf, val)) return;
568 elm_config_scroll_thumbscroll_border_friction_set(val); 568 elm_config_scroll_thumbscroll_border_friction_set(val);
569 elm_config_all_flush(); 569 elm_config_all_flush();
570} 570}
@@ -578,7 +578,7 @@ tssf_round(void *data EINA_UNUSED,
578 double v; 578 double v;
579 579
580 v = ((double)((int)(val * 20.0))) / 20.0; 580 v = ((double)((int)(val * 20.0))) / 20.0;
581 if (v != val) elm_slider_value_set(obj, v); 581 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
582} 582}
583 583
584static void 584static void
@@ -589,7 +589,7 @@ tssf_change(void *data EINA_UNUSED,
589 double tssf = elm_config_scroll_thumbscroll_sensitivity_friction_get(); 589 double tssf = elm_config_scroll_thumbscroll_sensitivity_friction_get();
590 double val = elm_slider_value_get(obj); 590 double val = elm_slider_value_get(obj);
591 591
592 if (tssf == val) return; 592 if (EINA_DBL_EQ(tssf, val)) return;
593 elm_config_scroll_thumbscroll_sensitivity_friction_set(val); 593 elm_config_scroll_thumbscroll_sensitivity_friction_set(val);
594 elm_config_all_flush(); 594 elm_config_all_flush();
595} 595}
@@ -603,7 +603,7 @@ tsat_round(void *data EINA_UNUSED,
603 double v; 603 double v;
604 604
605 v = ((double)((int)(val * 10.0))) / 10.0; 605 v = ((double)((int)(val * 10.0))) / 10.0;
606 if (v != val) elm_slider_value_set(obj, v); 606 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
607} 607}
608 608
609static void 609static void
@@ -614,7 +614,7 @@ tsat_change(void *data EINA_UNUSED,
614 double tsat = elm_config_scroll_thumbscroll_acceleration_threshold_get(); 614 double tsat = elm_config_scroll_thumbscroll_acceleration_threshold_get();
615 double val = elm_slider_value_get(obj); 615 double val = elm_slider_value_get(obj);
616 616
617 if (tsat == val) return; 617 if (EINA_DBL_EQ(tsat, val)) return;
618 elm_config_scroll_thumbscroll_acceleration_threshold_set(val); 618 elm_config_scroll_thumbscroll_acceleration_threshold_set(val);
619 elm_config_all_flush(); 619 elm_config_all_flush();
620} 620}
@@ -628,7 +628,7 @@ tsatl_round(void *data EINA_UNUSED,
628 double v; 628 double v;
629 629
630 v = ((double)((int)(val * 10.0))) / 10.0; 630 v = ((double)((int)(val * 10.0))) / 10.0;
631 if (v != val) elm_slider_value_set(obj, v); 631 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
632} 632}
633 633
634static void 634static void
@@ -639,7 +639,7 @@ tsatl_change(void *data EINA_UNUSED,
639 double tsatl = elm_config_scroll_thumbscroll_acceleration_time_limit_get(); 639 double tsatl = elm_config_scroll_thumbscroll_acceleration_time_limit_get();
640 double val = elm_slider_value_get(obj); 640 double val = elm_slider_value_get(obj);
641 641
642 if (tsatl == val) return; 642 if (EINA_DBL_EQ(tsatl, val)) return;
643 elm_config_scroll_thumbscroll_acceleration_time_limit_set(val); 643 elm_config_scroll_thumbscroll_acceleration_time_limit_set(val);
644 elm_config_all_flush(); 644 elm_config_all_flush();
645} 645}
@@ -653,7 +653,7 @@ tsaw_round(void *data EINA_UNUSED,
653 double v; 653 double v;
654 654
655 v = ((double)((int)(val * 10.0))) / 10.0; 655 v = ((double)((int)(val * 10.0))) / 10.0;
656 if (v != val) elm_slider_value_set(obj, v); 656 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
657} 657}
658 658
659static void 659static void
@@ -664,7 +664,7 @@ tsaw_change(void *data EINA_UNUSED,
664 double tsaw = elm_config_scroll_thumbscroll_acceleration_weight_get(); 664 double tsaw = elm_config_scroll_thumbscroll_acceleration_weight_get();
665 double val = elm_slider_value_get(obj); 665 double val = elm_slider_value_get(obj);
666 666
667 if (tsaw == val) return; 667 if (EINA_DBL_EQ(tsaw, val)) return;
668 elm_config_scroll_thumbscroll_acceleration_weight_set(val); 668 elm_config_scroll_thumbscroll_acceleration_weight_set(val);
669 elm_config_all_flush(); 669 elm_config_all_flush();
670} 670}
@@ -692,7 +692,7 @@ cf_round(void *data EINA_UNUSED,
692 double v; 692 double v;
693 693
694 v = ((double)((int)(val * 5.0))) / 5.0; 694 v = ((double)((int)(val * 5.0))) / 5.0;
695 if (v != val) elm_slider_value_set(obj, v); 695 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
696} 696}
697 697
698static void 698static void
@@ -703,7 +703,7 @@ cf_change(void *data EINA_UNUSED,
703 double cf = elm_config_cache_flush_interval_get(); 703 double cf = elm_config_cache_flush_interval_get();
704 double val = elm_slider_value_get(obj); 704 double val = elm_slider_value_get(obj);
705 705
706 if (cf == val) return; 706 if (EINA_DBL_EQ(cf, val)) return;
707 elm_config_cache_flush_interval_set(val); 707 elm_config_cache_flush_interval_set(val);
708 elm_config_all_flush(); 708 elm_config_all_flush();
709} 709}
@@ -717,7 +717,7 @@ fc_round(void *data EINA_UNUSED,
717 double v; 717 double v;
718 718
719 v = ((double)((int)(val * 10.0))) / 10.0; 719 v = ((double)((int)(val * 10.0))) / 10.0;
720 if (v != val) elm_slider_value_set(obj, v); 720 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
721} 721}
722 722
723static void 723static void
@@ -728,7 +728,7 @@ fc_change(void *data EINA_UNUSED,
728 double font_cache = elm_config_cache_font_cache_size_get(); 728 double font_cache = elm_config_cache_font_cache_size_get();
729 double val = elm_slider_value_get(obj); 729 double val = elm_slider_value_get(obj);
730 730
731 if (font_cache == val) return; 731 if (EINA_DBL_EQ(font_cache, val)) return;
732 elm_config_cache_font_cache_size_set(val * 1024); 732 elm_config_cache_font_cache_size_set(val * 1024);
733 elm_config_all_flush(); 733 elm_config_all_flush();
734} 734}
@@ -742,7 +742,7 @@ ic_round(void *data EINA_UNUSED,
742 double v; 742 double v;
743 743
744 v = ((double)((int)(val * 10.0))) / 10.0; 744 v = ((double)((int)(val * 10.0))) / 10.0;
745 if (v != val) elm_slider_value_set(obj, v); 745 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
746} 746}
747 747
748static void 748static void
@@ -753,7 +753,7 @@ ic_change(void *data EINA_UNUSED,
753 double image_cache = elm_config_cache_image_cache_size_get(); 753 double image_cache = elm_config_cache_image_cache_size_get();
754 double val = elm_slider_value_get(obj); 754 double val = elm_slider_value_get(obj);
755 755
756 if (image_cache == val) return; 756 if (EINA_DBL_EQ(image_cache, val)) return;
757 elm_config_cache_image_cache_size_set(val * 1024); 757 elm_config_cache_image_cache_size_set(val * 1024);
758 elm_config_all_flush(); 758 elm_config_all_flush();
759} 759}
@@ -767,7 +767,7 @@ sc_round(void *data EINA_UNUSED,
767 double v; 767 double v;
768 768
769 v = ((double)((int)(val * 10.0))) / 10.0; 769 v = ((double)((int)(val * 10.0))) / 10.0;
770 if (v != val) elm_slider_value_set(obj, v); 770 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
771} 771}
772 772
773static void 773static void
@@ -778,7 +778,7 @@ sc_change(void *data EINA_UNUSED,
778 double scale = elm_config_scale_get(); 778 double scale = elm_config_scale_get();
779 double val = elm_slider_value_get(obj); 779 double val = elm_slider_value_get(obj);
780 780
781 if (scale == val) return; 781 if (EINA_DBL_EQ(scale, val)) return;
782 elm_config_scale_set(val); 782 elm_config_scale_set(val);
783 elm_config_all_flush(); 783 elm_config_all_flush();
784} 784}
@@ -792,7 +792,7 @@ fs_round(void *data EINA_UNUSED,
792 double v; 792 double v;
793 793
794 v = ((double)((int)(val * 5.0))) / 5.0; 794 v = ((double)((int)(val * 5.0))) / 5.0;
795 if (v != val) elm_slider_value_set(obj, v); 795 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
796} 796}
797 797
798static void 798static void
@@ -803,7 +803,7 @@ fs_change(void *data EINA_UNUSED,
803 double fs = elm_config_finger_size_get(); 803 double fs = elm_config_finger_size_get();
804 double val = elm_slider_value_get(obj); 804 double val = elm_slider_value_get(obj);
805 805
806 if (fs == val) return; 806 if (EINA_DBL_EQ(fs, val)) return;
807 elm_config_finger_size_set(val); 807 elm_config_finger_size_set(val);
808 elm_config_all_flush(); 808 elm_config_all_flush();
809} 809}
@@ -817,7 +817,7 @@ efc_round(void *data EINA_UNUSED,
817 double v; 817 double v;
818 818
819 v = ((double)((int)(val * 5.0))) / 5.0; 819 v = ((double)((int)(val * 5.0))) / 5.0;
820 if (v != val) elm_slider_value_set(obj, v); 820 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
821} 821}
822 822
823static void 823static void
@@ -828,7 +828,7 @@ efc_change(void *data EINA_UNUSED,
828 double efc = elm_config_cache_edje_file_cache_size_get(); 828 double efc = elm_config_cache_edje_file_cache_size_get();
829 double val = elm_slider_value_get(obj); 829 double val = elm_slider_value_get(obj);
830 830
831 if (efc == val) return; 831 if (EINA_DBL_EQ(efc, val)) return;
832 elm_config_cache_edje_file_cache_size_set(val); 832 elm_config_cache_edje_file_cache_size_set(val);
833 elm_config_all_flush(); 833 elm_config_all_flush();
834} 834}
@@ -842,7 +842,7 @@ ecc_round(void *data EINA_UNUSED,
842 double v; 842 double v;
843 843
844 v = ((double)((int)(val * 5.0))) / 5.0; 844 v = ((double)((int)(val * 5.0))) / 5.0;
845 if (v != val) elm_slider_value_set(obj, v); 845 if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
846} 846}
847 847
848static void 848static void
@@ -853,7 +853,7 @@ ecc_change(void *data EINA_UNUSED,
853 double ecc = elm_config_cache_edje_collection_cache_size_get(); 853 double ecc = elm_config_cache_edje_collection_cache_size_get();
854 double val = elm_slider_value_get(obj); 854 double val = elm_slider_value_get(obj);
855 855
856 if (ecc == val) return; 856 if (EINA_DBL_EQ(ecc, val)) return;
857 elm_config_cache_edje_collection_cache_size_set(val); 857 elm_config_cache_edje_collection_cache_size_set(val);
858 elm_config_all_flush(); 858 elm_config_all_flush();
859} 859}
@@ -944,7 +944,7 @@ transition_duration_change(void *data EINA_UNUSED,
944 double val = elm_slider_value_get(obj); 944 double val = elm_slider_value_get(obj);
945 Eina_Bool scale = elm_config_transition_duration_factor_get(); 945 Eina_Bool scale = elm_config_transition_duration_factor_get();
946 946
947 if (scale == val) return; 947 if (EINA_DBL_EQ(scale, val)) return;
948 elm_config_transition_duration_factor_set(val); 948 elm_config_transition_duration_factor_set(val);
949 elm_config_all_flush(); 949 elm_config_all_flush();
950} 950}
diff --git a/src/bin/elementary/elm_prefs_cc_parse.c b/src/bin/elementary/elm_prefs_cc_parse.c
index 11415e1d86..fa960ac326 100644
--- a/src/bin/elementary/elm_prefs_cc_parse.c
+++ b/src/bin/elementary/elm_prefs_cc_parse.c
@@ -1345,7 +1345,7 @@ _calcf(char op, double a, double b)
1345 return a; 1345 return a;
1346 1346
1347 case '/': 1347 case '/':
1348 if (b != 0) a /= b; 1348 if (EINA_DBL_NONZERO(b)) a /= b;
1349 else 1349 else
1350 ERR("%s:%i divide by zero", file_in, line - 1); 1350 ERR("%s:%i divide by zero", file_in, line - 1);
1351 return a; 1351 return a;
@@ -1355,7 +1355,7 @@ _calcf(char op, double a, double b)
1355 return a; 1355 return a;
1356 1356
1357 case '%': 1357 case '%':
1358 if (0 != b) a = (double)((int)a % (int)b); 1358 if (EINA_DBL_NONZERO(b)) a = (double)((int)a % (int)b);
1359 else 1359 else
1360 ERR("%s:%i modula by zero", file_in, line - 1); 1360 ERR("%s:%i modula by zero", file_in, line - 1);
1361 return a; 1361 return a;
diff --git a/src/bin/elementary/test_gesture_layer3.c b/src/bin/elementary/test_gesture_layer3.c
index 1029087d44..7e5007aed1 100644
--- a/src/bin/elementary/test_gesture_layer3.c
+++ b/src/bin/elementary/test_gesture_layer3.c
@@ -272,7 +272,7 @@ rotate_end(void *_po, void *event_info)
272 po->rot_tot_time = fabs(r_info->momentum) / ROTATE_MOMENTUM_FRICTION; 272 po->rot_tot_time = fabs(r_info->momentum) / ROTATE_MOMENTUM_FRICTION;
273 po->rot_momentum = r_info->momentum; 273 po->rot_momentum = r_info->momentum;
274 po->rot_progress = 0.0; 274 po->rot_progress = 0.0;
275 if (po->rot_momentum) 275 if (EINA_DBL_NONZERO(po->rot_momentum))
276 { 276 {
277 po->rot_timer = ecore_animator_add(rotate_momentum_animation_operation, po); 277 po->rot_timer = ecore_animator_add(rotate_momentum_animation_operation, po);
278 } 278 }
@@ -334,7 +334,7 @@ zoom_end(void *_po, void *event_info)
334 po->zoom_mom_time = tot_time; 334 po->zoom_mom_time = tot_time;
335 po->zoom_mom = p->momentum; 335 po->zoom_mom = p->momentum;
336 po->base_zoom = po->zoom; 336 po->base_zoom = po->zoom;
337 if (po->zoom_mom) 337 if (EINA_DBL_NONZERO(po->zoom_mom))
338 { 338 {
339 po->zoom_momentum = elm_transit_add(); 339 po->zoom_momentum = elm_transit_add();
340 elm_transit_duration_set(po->zoom_momentum, 340 elm_transit_duration_set(po->zoom_momentum,
@@ -425,7 +425,7 @@ momentum_end(void *_po, void *event_info)
425 po->mom_tot_time = sqrt((p->mx * p->mx) + (p->my * p->my)) 425 po->mom_tot_time = sqrt((p->mx * p->mx) + (p->my * p->my))
426 / MOMENTUM_FRICTION; 426 / MOMENTUM_FRICTION;
427 427
428 if (po->mom_tot_time) 428 if (EINA_DBL_NONZERO(po->mom_tot_time))
429 { /* Compute acceleration for both compenents, and launch timer */ 429 { /* Compute acceleration for both compenents, and launch timer */
430 po->mom_x_acc = (p->mx) / po->mom_tot_time; /* a = (v-v0) / t */ 430 po->mom_x_acc = (p->mx) / po->mom_tot_time; /* a = (v-v0) / t */
431 po->mom_y_acc = (p->my) / po->mom_tot_time; /* a = (v-v0) / t */ 431 po->mom_y_acc = (p->my) / po->mom_tot_time; /* a = (v-v0) / t */
diff --git a/src/bin/elementary/test_glview_manygears.c b/src/bin/elementary/test_glview_manygears.c
index 31084b78ec..fbf404bf4f 100644
--- a/src/bin/elementary/test_glview_manygears.c
+++ b/src/bin/elementary/test_glview_manygears.c
@@ -405,7 +405,7 @@ perspective(GLfloat *m, GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFa
405 sine = sin(radians); 405 sine = sin(radians);
406 cosine = cos(radians); 406 cosine = cos(radians);
407 407
408 if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) 408 if (EINA_DBL_EQ(deltaZ, 0) || EINA_DBL_EQ(sine, 0) || EINA_DBL_EQ(aspect, 0))
409 return; 409 return;
410 410
411 cotangent = cosine / sine; 411 cotangent = cosine / sine;
diff --git a/src/bin/elementary/test_map.c b/src/bin/elementary/test_map.c
index 3fe55b9be7..ecc19de172 100644
--- a/src/bin/elementary/test_map.c
+++ b/src/bin/elementary/test_map.c
@@ -448,7 +448,7 @@ _map_name_loaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA
448 if (addr) 448 if (addr)
449 { 449 {
450 printf("name of [lon = %lf, lat = %lf] is %s\n", lon, lat, addr); 450 printf("name of [lon = %lf, lat = %lf] is %s\n", lon, lat, addr);
451 if ((lon != 0.0) && (lat !=0.0)) 451 if (EINA_DBL_NONZERO(lon) && EINA_DBL_NONZERO(lat))
452 { 452 {
453 Eina_Bool b = elm_map_paused_get(data); 453 Eina_Bool b = elm_map_paused_get(data);
454 elm_map_paused_set(data, EINA_TRUE); 454 elm_map_paused_set(data, EINA_TRUE);
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index 558b221c9a..687033b0f1 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -175,7 +175,7 @@ my_bt_zoom_in(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UN
175 zoom -= 0.5; 175 zoom -= 0.5;
176 else if ((zoom > 1.0) && (zoom <= 1.5)) 176 else if ((zoom > 1.0) && (zoom <= 1.5))
177 zoom = 1.0; 177 zoom = 1.0;
178 else if (zoom == 1.0) 178 else if (EINA_DBL_EQ(zoom, 1.0))
179 zoom = 0.8; 179 zoom = 0.8;
180 else 180 else
181 zoom = zoom * zoom; 181 zoom = zoom * zoom;
diff --git a/src/bin/elementary/test_tooltip.c b/src/bin/elementary/test_tooltip.c
index eb4ce890c1..3615886478 100644
--- a/src/bin/elementary/test_tooltip.c
+++ b/src/bin/elementary/test_tooltip.c
@@ -157,7 +157,7 @@ _tt_item_icon3(void *data EINA_UNUSED,
157 sc = ((float)sw * 0.8) / (float)w; 157 sc = ((float)sw * 0.8) / (float)w;
158 else if ((float)h / (float)sh >= 0.8) 158 else if ((float)h / (float)sh >= 0.8)
159 sc = ((float)sh * 0.8) / (float)h; 159 sc = ((float)sh * 0.8) / (float)h;
160 if (sc) elm_object_scale_set(ic, sc); 160 if (EINA_FLT_NONZERO(sc)) elm_object_scale_set(ic, sc);
161 } 161 }
162 return ic; 162 return ic;
163} 163}