[gnome-calculator] GCalc: Renamed GErrorExpression to ErrorExpression
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] GCalc: Renamed GErrorExpression to ErrorExpression
- Date: Thu, 17 Oct 2019 19:10:34 +0000 (UTC)
commit 6f355b4b30ad855524d0fa6b84bd8e509ac76bff
Author: Daniel Espinosa <esodan gmail com>
Date: Thu Oct 17 13:56:49 2019 -0500
GCalc: Renamed GErrorExpression to ErrorExpression
Removed MathErrorExpression interface
gcalc/gcalc-error-result.vala | 2 +-
gcalc/gcalc-expression.vala | 4 ++--
gcalc/gcalc-function.vala | 2 +-
gcalc/gcalc-math-expression.vala | 6 ------
gcalc/gcalc-math-polynomial.vala | 2 +-
gcalc/gcalc-math-term.vala | 2 +-
6 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/gcalc/gcalc-error-result.vala b/gcalc/gcalc-error-result.vala
index 2fcc0c44..6f2c5b3f 100644
--- a/gcalc/gcalc-error-result.vala
+++ b/gcalc/gcalc-error-result.vala
@@ -30,7 +30,7 @@ public class GCalc.ErrorResult : Object, MathResult, MathErrorResult {
public ErrorResult (string msg) {
this.msg = msg;
- _expression = new GErrorExpression ();
+ _expression = new ErrorExpression ();
}
// Result
public MathExpression expression { get { return _expression; } }
diff --git a/gcalc/gcalc-expression.vala b/gcalc/gcalc-expression.vala
index abfd758b..77ce72a5 100644
--- a/gcalc/gcalc-expression.vala
+++ b/gcalc/gcalc-expression.vala
@@ -42,7 +42,7 @@ public class GCalc.Expression : Object, MathExpression {
}
/**
- * An implementation of {@link MathErrorExpression}
+ * Represent an expression in error condition
*/
-public class GCalc.GErrorExpression : Expression, MathErrorExpression {}
+public class GCalc.ErrorExpression : Expression {}
diff --git a/gcalc/gcalc-function.vala b/gcalc/gcalc-function.vala
index 46c71ef6..d0b26314 100644
--- a/gcalc/gcalc-function.vala
+++ b/gcalc/gcalc-function.vala
@@ -53,7 +53,7 @@ public class GCalc.Function : Expression, MathFunction, Hashable {
}
internal virtual MathExpression evaluate () throws GLib.Error {
- return new GErrorExpression ();
+ return new ErrorExpression ();
}
// Hashable
internal uint hash () {
diff --git a/gcalc/gcalc-math-expression.vala b/gcalc/gcalc-math-expression.vala
index 2f84f585..9beabc41 100644
--- a/gcalc/gcalc-math-expression.vala
+++ b/gcalc/gcalc-math-expression.vala
@@ -40,9 +40,3 @@ public interface GCalc.MathExpression : Object {
public abstract MathResult solve ();
}
-/**
- * Represent an expression in error condition
- */
-public interface GCalc.MathErrorExpression : Object, MathExpression {
-}
-
diff --git a/gcalc/gcalc-math-polynomial.vala b/gcalc/gcalc-math-polynomial.vala
index 6cd742f6..95065439 100644
--- a/gcalc/gcalc-math-polynomial.vala
+++ b/gcalc/gcalc-math-polynomial.vala
@@ -56,7 +56,7 @@ public interface GCalc.MathPolynomial : Object, MathExpression {
}
}
if (res == null) {
- return new GErrorExpression ();
+ return new ErrorExpression ();
}
return res;
}
diff --git a/gcalc/gcalc-math-term.vala b/gcalc/gcalc-math-term.vala
index b29d14b4..6f14426e 100644
--- a/gcalc/gcalc-math-term.vala
+++ b/gcalc/gcalc-math-term.vala
@@ -31,7 +31,7 @@ public interface GCalc.MathTerm : Object, MathExpression {
if (t.expressions.get_n_items () == 0) {
return new Constant.@double (1.0);
}
- MathExpression res = new GErrorExpression ();
+ MathExpression res = new ErrorExpression ();
var e = evaluate ();
var e2 = t.evaluate ();
if (e is MathConstant && e2 is MathConstant) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]