[gnome-calculator/gnome-3-32] Drop leading zeros octal prefix (#110, #114)
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/gnome-3-32] Drop leading zeros octal prefix (#110, #114)
- Date: Wed, 26 Jun 2019 05:15:04 +0000 (UTC)
commit a0e5045b11b018ae728ecbfd08bf3fc9326a4b10
Author: Robert Roth <robert roth off gmail com>
Date: Mon May 27 09:54:53 2019 +0300
Drop leading zeros octal prefix (#110, #114)
lib/number.vala | 16 ----------------
1 file changed, 16 deletions(-)
---
diff --git a/lib/number.vala b/lib/number.vala
index 1f930bea..c94c7feb 100644
--- a/lib/number.vala
+++ b/lib/number.vala
@@ -1123,22 +1123,6 @@ private static int parse_literal_prefix (string str, ref int prefix_len)
if (new_base != 0)
prefix_len = 2;
- if (prefix.isdigit ())
- {
- unichar c;
- bool all_digits = true;
- bool all_binary_digits = true;
-
- for (int i = 2; str.get_next_char (ref i, out c) && all_digits;)
- all_digits = c.isdigit ();
-
- for (int i = 2; str.get_next_char (ref i, out c) && all_binary_digits;)
- all_binary_digits = (c == '0' || c == '1');
-
- if (all_digits && !all_binary_digits)
- new_base = 8;
- }
-
return new_base;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]