[gnome-calculator] GCalc: renamed GPolynomial to Polynomial



commit 7340a948a62d743feba9682eebc4e60a08b88ec6
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Oct 17 10:37:00 2019 -0500

    GCalc: renamed GPolynomial to Polynomial

 gcalc/gcalc-gparser.vala                           | 22 +++++++++++-----------
 gcalc/gcalc-math-polynomial.vala                   |  2 +-
 ...calc-gpolynomial.vala => gcalc-polynomial.vala} |  4 ++--
 gcalc/meson.build                                  |  2 +-
 4 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/gcalc/gcalc-gparser.vala b/gcalc/gcalc-gparser.vala
index 971a6c6b..d3825c29 100644
--- a/gcalc/gcalc-gparser.vala
+++ b/gcalc/gcalc-gparser.vala
@@ -72,7 +72,7 @@ public class GCalc.GParser : Object {
           if (sfunc != null) {
             sfunc = Object.new (sfunc.get_type ()) as MathExpression;
             if (current == null) {
-              var exp = new GPolynomial ();
+              var exp = new Polynomial ();
               eq.expressions.add (exp);
               var t = new GTerm ();
               exp.expressions.add (t);
@@ -115,7 +115,7 @@ public class GCalc.GParser : Object {
               ((Variable) v).bind = sv;
             }
             if (current == null) {
-              var exp = new GPolynomial ();
+              var exp = new Polynomial ();
               eq.expressions.add (exp);
               var t = new GTerm ();
               exp.expressions.add (t);
@@ -145,7 +145,7 @@ public class GCalc.GParser : Object {
           }
           var cexp = new GConstant.@double (double.parse (n));
           if (current == null) {
-            var exp = new GPolynomial ();
+            var exp = new Polynomial ();
             eq.expressions.add (exp);
             var t = new GTerm ();
             exp.expressions.add (t);
@@ -211,7 +211,7 @@ public class GCalc.GParser : Object {
             var expa = new GAssign ();
             eq.expressions.add (expa);
             expa.expressions.add (current);
-            var exp = new GPolynomial ();
+            var exp = new Polynomial ();
             expa.expressions.add (exp);
             var t = new GTerm ();
             exp.expressions.add (t);
@@ -223,13 +223,13 @@ public class GCalc.GParser : Object {
           break;
         case TokenType.OPEN_PARENS:
           if (current == null) {
-            var exp = new GPolynomial ();
+            var exp = new Polynomial ();
             eq.expressions.add (exp);
             var t = new GTerm ();
             exp.expressions.add (t);
             var g = new GGroup ();
             t.expressions.add (g);
-            var exp2 = new GPolynomial ();
+            var exp2 = new Polynomial ();
             var t2 = new GTerm ();
             exp2.expressions.add (t2);
             g.expressions.add (exp2);
@@ -237,7 +237,7 @@ public class GCalc.GParser : Object {
             current_parent = exp2;
             top_parent = g;
           } else if (current is Function) {
-            var fexp = new GPolynomial ();
+            var fexp = new Polynomial ();
             var t = new GTerm ();
             fexp.expressions.add (t);
             current.expressions.add (fexp);
@@ -248,7 +248,7 @@ public class GCalc.GParser : Object {
           } else if (current is MathOperator && current_parent is Term && top_parent is MathPolynomial) {
             var g = new GGroup ();
             current_parent.expressions.add (g);
-            var exp = new GPolynomial ();
+            var exp = new Polynomial ();
             g.expressions.add (exp);
             var t = new GTerm ();
             exp.expressions.add (t);
@@ -339,7 +339,7 @@ public class GCalc.GParser : Object {
       throw new ParserError.INVALID_TOKEN_ERROR ("Found an unexpected expression for a plus operator");
     }
     if (current == null) {
-      var exp = new GPolynomial ();
+      var exp = new Polynomial ();
       var t = new GTerm ();
       t.expressions.add (opp);
       exp.expressions.add (t);
@@ -374,7 +374,7 @@ public class GCalc.GParser : Object {
       expected.clear ();
     } else if (current is Variable && current_parent == null) {
       // New MathPolynomial
-      var exp = new GPolynomial ();
+      var exp = new Polynomial ();
       eq.expressions.add (exp);
       var t = new GTerm ();
       exp.expressions.add (t);
@@ -399,7 +399,7 @@ public class GCalc.GParser : Object {
         expected.clear ();
     } else if (current is Variable && current_parent == null) {
       // New MathPolynomial
-      var exp = new GPolynomial ();
+      var exp = new Polynomial ();
       eq.expressions.add (exp);
       var t = new GTerm ();
       exp.expressions.add (t);
diff --git a/gcalc/gcalc-math-polynomial.vala b/gcalc/gcalc-math-polynomial.vala
index 3515bdb7..bce9ac68 100644
--- a/gcalc/gcalc-math-polynomial.vala
+++ b/gcalc/gcalc-math-polynomial.vala
@@ -1,4 +1,4 @@
-/* gcalc-polynomial.vala
+/* gcalc-math-polynomial.vala
  *
  * Copyright (C) 2018  Daniel Espinosa <esodan gmail com>
  *
diff --git a/gcalc/gcalc-gpolynomial.vala b/gcalc/gcalc-polynomial.vala
similarity index 92%
rename from gcalc/gcalc-gpolynomial.vala
rename to gcalc/gcalc-polynomial.vala
index 0a8b20bb..f41289f6 100644
--- a/gcalc/gcalc-gpolynomial.vala
+++ b/gcalc/gcalc-polynomial.vala
@@ -1,4 +1,4 @@
-/* gcalc-gpolynomial.vala
+/* gcalc-polynomial.vala
  *
  * Copyright (C) 2018  Daniel Espinosa <esodan gmail com>
  *
@@ -18,7 +18,7 @@
  * Authors:
  *      Daniel Espinosa <esodan gmail com>
  */
-public class GCalc.GPolynomial : Expression, MathPolynomial {
+public class GCalc.Polynomial : Expression, MathPolynomial {
   internal override Result solve () {
     Result res = null;
     try {
diff --git a/gcalc/meson.build b/gcalc/meson.build
index d6917d1e..94b8af8f 100644
--- a/gcalc/meson.build
+++ b/gcalc/meson.build
@@ -91,7 +91,6 @@ gcalc_sources = files([
        'gcalc-gparameter.vala',
        'gcalc-gparser.vala',
        'gcalc-gplus.vala',
-       'gcalc-gpolynomial.vala',
        'gcalc-gpow.vala',
        'gcalc-gresult.vala',
        'gcalc-group.vala',
@@ -110,6 +109,7 @@ gcalc_sources = files([
        'gcalc-multiply.vala',
        'gcalc-parameter.vala',
        'gcalc-plus.vala',
+       'gcalc-polynomial.vala',
        'gcalc-pow.vala',
        'gcalc-result.vala',
        'gcalc-solver.vala',


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