[dconf-editor] Remove double.MIN use.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Remove double.MIN use.
- Date: Tue, 25 Sep 2018 11:37:00 +0000 (UTC)
commit 2b6699d1da93359a7f3967fd33c2ba062be37573
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 8a915a3..fd6d8bb 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]