[gnome-calculator/gnome-42] Removed error-prone automatic brace addition (fixes #271)
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/gnome-42] Removed error-prone automatic brace addition (fixes #271)
- Date: Fri, 13 May 2022 07:01:35 +0000 (UTC)
commit 5948e6bac842e0359f222d74c04a4544a71c6523
Author: Robert Roth <robert roth off gmail com>
Date: Fri May 13 10:00:50 2022 +0300
Removed error-prone automatic brace addition (fixes #271)
lib/math-equation.vala | 14 --------------
1 file changed, 14 deletions(-)
---
diff --git a/lib/math-equation.vala b/lib/math-equation.vala
index 47427680..09323650 100644
--- a/lib/math-equation.vala
+++ b/lib/math-equation.vala
@@ -1025,20 +1025,6 @@ public class MathEquation : GtkSource.Buffer
var solvedata = new SolveData ();
var text = equation;
- /* Count the number of brackets and automatically add missing closing brackets */
- var n_brackets = 0;
- for (var i = 0; text[i] != '\0'; i++)
- {
- if (text[i] == '(')
- n_brackets++;
- else if (text[i] == ')')
- n_brackets--;
- }
- while (n_brackets > 0)
- {
- text += ")";
- n_brackets--;
- }
ErrorCode error_code;
string error_token;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]