[gnome-calculator] GCalc: renamed Pow to MathPow
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] GCalc: renamed Pow to MathPow
- Date: Thu, 17 Oct 2019 19:09:23 +0000 (UTC)
commit 95812d02c214ebcc349e1d9c6ef277de0e89cf99
Author: Daniel Espinosa <esodan gmail com>
Date: Thu Oct 17 12:26:17 2019 -0500
GCalc: renamed Pow to MathPow
gcalc/gcalc-gpow.vala | 2 +-
gcalc/{gcalc-pow.vala => gcalc-math-pow.vala} | 4 ++--
gcalc/gcalc-term.vala | 2 +-
gcalc/meson.build | 2 +-
tests/gcalc-parsing.vala | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gcalc/gcalc-gpow.vala b/gcalc/gcalc-gpow.vala
index 923bfd85..32bda45f 100644
--- a/gcalc/gcalc-gpow.vala
+++ b/gcalc/gcalc-gpow.vala
@@ -18,7 +18,7 @@
* Authors:
* Daniel Espinosa <esodan gmail com>
*/
-public class GCalc.GPow : Expression, MathOperator, Pow {
+public class GCalc.GPow : Expression, MathOperator, MathPow {
internal override string to_string () {
return "^";
}
diff --git a/gcalc/gcalc-pow.vala b/gcalc/gcalc-math-pow.vala
similarity index 89%
rename from gcalc/gcalc-pow.vala
rename to gcalc/gcalc-math-pow.vala
index c2a5851a..a043ca39 100644
--- a/gcalc/gcalc-pow.vala
+++ b/gcalc/gcalc-math-pow.vala
@@ -1,4 +1,4 @@
-/* gcalc-pow.vala
+/* gcalc-math-pow.vala
*
* Copyright (C) 2019 Daniel Espinosa <esodan gmail com>
*
@@ -18,5 +18,5 @@
* Authors:
* Daniel Espinosa <esodan gmail com>
*/
-public interface GCalc.Pow : Object, MathExpression, MathOperator {}
+public interface GCalc.MathPow : Object, MathExpression, MathOperator {}
diff --git a/gcalc/gcalc-term.vala b/gcalc/gcalc-term.vala
index b9305a5a..ae5c2b44 100644
--- a/gcalc/gcalc-term.vala
+++ b/gcalc/gcalc-term.vala
@@ -106,7 +106,7 @@ public interface GCalc.Term : Object, MathExpression {
if (op is MathDivision) {
res = c1.divide (c2);
}
- if (op is Pow) {
+ if (op is MathPow) {
res = c1.pow (c2);
}
if (res == null) {
diff --git a/gcalc/meson.build b/gcalc/meson.build
index 7cf61ce8..07e3a58d 100644
--- a/gcalc/meson.build
+++ b/gcalc/meson.build
@@ -104,13 +104,13 @@ gcalc_sources = files([
'gcalc-math-parameter.vala',
'gcalc-math-plus.vala',
'gcalc-math-polynomial.vala',
+ 'gcalc-math-pow.vala',
'gcalc-minus.vala',
'gcalc-multiply.vala',
'gcalc-parameter.vala',
'gcalc-parser.vala',
'gcalc-plus.vala',
'gcalc-polynomial.vala',
- 'gcalc-pow.vala',
'gcalc-result.vala',
'gcalc-solver.vala',
'gcalc-term.vala',
diff --git a/tests/gcalc-parsing.vala b/tests/gcalc-parsing.vala
index d57ec3ba..4a55c164 100644
--- a/tests/gcalc-parsing.vala
+++ b/tests/gcalc-parsing.vala
@@ -775,7 +775,7 @@ class Tests {
assert (t.expressions.get_n_items () == 3);
var c1 = t.expressions.get_item (0) as MathConstant;
assert (c1 != null);
- var pw = t.expressions.get_item (1) as Pow;
+ var pw = t.expressions.get_item (1) as MathPow;
assert (pw != null);
var c2 = t.expressions.get_item (2) as MathConstant;
assert (c2 != null);
@@ -801,7 +801,7 @@ class Tests {
assert (t.expressions.get_n_items () == 3);
var c1 = t.expressions.get_item (0) as MathConstant;
assert (c1 != null);
- var pw = t.expressions.get_item (1) as Pow;
+ var pw = t.expressions.get_item (1) as MathPow;
assert (pw != null);
var g = t.expressions.get_item (2) as MathGroup;
assert (g != null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]