[gnome-calculator] GCalc: renamed Parameter to MathParameter



commit e6052009983097012681091c0a538e88842445b0
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Oct 17 12:14:17 2019 -0500

    GCalc: renamed Parameter to MathParameter

 gcalc/gcalc-gparameter.vala                               | 2 +-
 gcalc/{gcalc-parameter.vala => gcalc-math-parameter.vala} | 4 ++--
 gcalc/gcalc-variable.vala                                 | 2 +-
 gcalc/meson.build                                         | 2 +-
 tests/gcalc-parsing.vala                                  | 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gcalc/gcalc-gparameter.vala b/gcalc/gcalc-gparameter.vala
index a4a02cc2..be6c1a32 100644
--- a/gcalc/gcalc-gparameter.vala
+++ b/gcalc/gcalc-gparameter.vala
@@ -18,7 +18,7 @@
  * Authors:
  *      Daniel Espinosa <esodan gmail com>
  */
-public class GCalc.GParameter : GCalc.GVariable, Parameter {
+public class GCalc.GParameter : GCalc.GVariable, MathParameter {
 
   public GParameter (string name) {
     base (name);
diff --git a/gcalc/gcalc-parameter.vala b/gcalc/gcalc-math-parameter.vala
similarity index 91%
rename from gcalc/gcalc-parameter.vala
rename to gcalc/gcalc-math-parameter.vala
index 719fabf9..59d8ad29 100644
--- a/gcalc/gcalc-parameter.vala
+++ b/gcalc/gcalc-math-parameter.vala
@@ -1,4 +1,4 @@
-/* gcalc-expresion.vala
+/* gcalc-math-parameter.vala
  *
  * Copyright (C) 2019  Daniel Espinosa <esodan gmail com>
  *
@@ -25,7 +25,7 @@
  *
  * Currently the value will be converted to a {@link MathConstant} if possible.
  */
-public interface GCalc.Parameter : Object, MathExpression, Variable {
+public interface GCalc.MathParameter : Object, MathExpression, Variable {
   public abstract void set_value (GLib.Value val) throws GLib.Error;
   public abstract GLib.Value get_value ();
 }
diff --git a/gcalc/gcalc-variable.vala b/gcalc/gcalc-variable.vala
index 04380fb8..1b0e432c 100644
--- a/gcalc/gcalc-variable.vala
+++ b/gcalc/gcalc-variable.vala
@@ -31,7 +31,7 @@ public interface GCalc.Variable : Object, MathExpression {
     if (bind != null) {
       return bind.evaluate ();
     }
-    if (this is Parameter) {
+    if (this is MathParameter) {
       return @value;
     }
     if (parent == null) {
diff --git a/gcalc/meson.build b/gcalc/meson.build
index 09dc22af..c5c28ad7 100644
--- a/gcalc/meson.build
+++ b/gcalc/meson.build
@@ -103,10 +103,10 @@ gcalc_sources = files([
        'gcalc-math-group.vala',
        'gcalc-math-minus.vala',
        'gcalc-math-operator.vala',
+       'gcalc-math-parameter.vala',
        'gcalc-math-polynomial.vala',
        'gcalc-minus.vala',
        'gcalc-multiply.vala',
-       'gcalc-parameter.vala',
        'gcalc-parser.vala',
        'gcalc-plus.vala',
        'gcalc-polynomial.vala',
diff --git a/tests/gcalc-parsing.vala b/tests/gcalc-parsing.vala
index 6f522155..3ee7c9af 100644
--- a/tests/gcalc-parsing.vala
+++ b/tests/gcalc-parsing.vala
@@ -1095,7 +1095,7 @@ class Tests {
         assert (t != null);
         var ev = t.expressions.get_item (0) as Variable;
         assert (ev != null);
-        var p = ev as GCalc.Parameter;
+        var p = ev as GCalc.MathParameter;
         assert (p != null);
         assert (p.name == "param1");
         var eq2 = eqman.equations.get_item (1) as MathEquation;
@@ -1129,7 +1129,7 @@ class Tests {
         var cr = r.expression as MathConstant;
         assert (cr != null);
         assert (cr.real () == 0.0);
-        var p = eq.variables.find_named ("param1") as GCalc.Parameter;
+        var p = eq.variables.find_named ("param1") as GCalc.MathParameter;
         assert (p != null);
         p.set_value (10.0);
         r = eq.solve ();


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