[dconf-editor/gnome-3-30] Remove double.MIN use.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor/gnome-3-30] Remove double.MIN use.
- Date: Tue, 25 Sep 2018 11:26:43 +0000 (UTC)
commit 9dc71bb7c933393106f3bce504295dee3826245d
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]