[gnome-calculator/wip-gtk4-port] Renamed function equals and compare methods
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/wip-gtk4-port] Renamed function equals and compare methods
- Date: Fri, 1 Oct 2021 17:05:09 +0000 (UTC)
commit 28d9171db6fcdc5bc70dd5c2d102e8a9f1f4b336
Author: Robert Roth <robert roth off gmail com>
Date: Fri Oct 1 20:04:12 2021 +0300
Renamed function equals and compare methods
lib/math-function.vala | 4 ++--
src/math-function-popover.vala | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/math-function.vala b/lib/math-function.vala
index 4373d360..473f6c93 100644
--- a/lib/math-function.vala
+++ b/lib/math-function.vala
@@ -31,12 +31,12 @@ public class MathFunction : Object
get { return _description; }
}
- public static int compare_func (MathFunction function1, MathFunction function2)
+ public static int name_compare_func (MathFunction function1, MathFunction function2)
{
return strcmp (function1.name, function2.name);
}
- public static bool equal_func (MathFunction function1, MathFunction function2)
+ public static bool name_equal_func (MathFunction function1, MathFunction function2)
{
return function1.name == function2.name;
}
diff --git a/src/math-function-popover.vala b/src/math-function-popover.vala
index f495b24c..98959996 100644
--- a/src/math-function-popover.vala
+++ b/src/math-function-popover.vala
@@ -32,7 +32,7 @@ public class MathFunctionPopover : MathPopover<MathFunction>
public MathFunctionPopover (MathEquation equation, ListStore model)
{
- base (equation, model, (a,b) => MathFunction.compare_func (a as MathFunction,b as MathFunction));
+ base (equation, model, (a,b) => MathFunction.name_compare_func (a as MathFunction,b as
MathFunction));
function_list.bind_model (model, (item) => make_item_row(item as MathFunction));
@@ -132,7 +132,7 @@ public class MathFunctionPopover : MathPopover<MathFunction>
protected override int get_item_index (MathFunction item)
{
uint position;
- if (model.find_with_equal_func (item as Object, (a, b) => (MathFunction.equal_func(a as
MathFunction, b as MathFunction)), out position))
+ if (model.find_with_equal_func (item as Object, (a, b) => (MathFunction.name_equal_func(a as
MathFunction, b as MathFunction)), out position))
return (int)position;
else
return -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]