[dconf-editor/maintainer-only-3-30] Remove double.MIN use.



commit 5dd8ba10886f5f8437b84aeff8938462e24de56b
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Sep 25 13:25:33 2018 +0200

    Remove double.MIN use.
    
    https://gitlab.gnome.org/GNOME/vala/issues/680

 editor/dconf-view.vala     | 2 +-
 editor/setting-object.vala | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/editor/dconf-view.vala b/editor/dconf-view.vala
index 5db7443..60379d5 100644
--- a/editor/dconf-view.vala
+++ b/editor/dconf-view.vala
@@ -343,7 +343,7 @@ private class KeyEditorChildNumberDouble : KeyEditorChildNumberCustom
         }
         else
         {
-            min = double.MIN;
+            min = -double.MAX; // https://gitlab.gnome.org/GNOME/vala/issues/680
             max = double.MAX;
         }
 
diff --git a/editor/setting-object.vala b/editor/setting-object.vala
index 4ab926e..096cc07 100644
--- a/editor/setting-object.vala
+++ b/editor/setting-object.vala
@@ -144,9 +144,9 @@ private abstract class Key : SettingObject
                 max = (!) (nullable_max ?? "%llu".printf (uint64.MAX));
                 return;
             case "d":
-                string? nullable_min = "%'g".printf (double.MIN).locale_to_utf8 (-1, null, null, null);
+                string? nullable_min = "%'g".printf (-double.MAX).locale_to_utf8 (-1, null, null, null);    
// see after
                 string? nullable_max = "%'g".printf (double.MAX).locale_to_utf8 (-1, null, null, null);
-                min = (!) (nullable_min ?? "%g".printf (double.MIN));
+                min = (!) (nullable_min ?? "%g".printf (-double.MAX));  // 
https://gitlab.gnome.org/GNOME/vala/issues/680
                 max = (!) (nullable_max ?? "%g".printf (double.MAX));
                 return;
             case "h":


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]