[gnome-games] core: Add hash() & equal() methods to Developer object
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] core: Add hash() & equal() methods to Developer object
- Date: Fri, 3 Aug 2018 16:36:11 +0000 (UTC)
commit b5e61ce15ff3675c0a97e265cdb1d7be1168decc
Author: 1PunMan <saurabhsingh412 gmail com>
Date: Wed Aug 1 23:31:22 2018 +0530
core: Add hash() & equal() methods to Developer object
src/core/developer.vala | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/core/developer.vala b/src/core/developer.vala
index abee5726..c9ac6ef9 100644
--- a/src/core/developer.vala
+++ b/src/core/developer.vala
@@ -4,4 +4,12 @@ public interface Games.Developer : Object {
public signal void changed ();
public abstract string get_developer ();
+
+ public static uint hash (Developer developer) {
+ return str_hash (developer.get_developer ());
+ }
+
+ public static bool equal (Developer a, Developer b) {
+ return str_equal (a.get_developer (), b.get_developer ());
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]