[rygel/wip/ruih] ruih: Allow null for protocols
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/ruih] ruih: Allow null for protocols
- Date: Sun, 19 Oct 2014 14:10:27 +0000 (UTC)
commit 4209478c926c06375a2248b8daead17412a16eb4
Author: Jens Georg <mail jensge org>
Date: Sun Oct 19 14:50:17 2014 +0200
ruih: Allow null for protocols
The code checks for == null and returns true then. But if the variable
is not marked as nullable, vala will add g_val_return_if_fail (FALSE,…
to the beginning of the function.
Signed-off-by: Jens Georg <mail jensge org>
src/librygel-ruih/rygel-ruih-icon-elem.vala | 2 +-
src/librygel-ruih/rygel-ruih-protocol-elem.vala | 2 +-
src/librygel-ruih/rygel-ruih-ui-elem.vala | 2 +-
src/librygel-ruih/rygel-ruih-ui-listing.vala | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/librygel-ruih/rygel-ruih-icon-elem.vala b/src/librygel-ruih/rygel-ruih-icon-elem.vala
index 556fd4c..32c93c0 100644
--- a/src/librygel-ruih/rygel-ruih-icon-elem.vala
+++ b/src/librygel-ruih/rygel-ruih-icon-elem.vala
@@ -76,7 +76,7 @@ protected class IconElem : UIListing {
}
}
- public override bool match (Gee.ArrayList<ProtocolElem> protocols, Gee.ArrayList<FilterEntry> filters) {
+ public override bool match (Gee.ArrayList<ProtocolElem>? protocols, Gee.ArrayList<FilterEntry> filters) {
return true;
}
diff --git a/src/librygel-ruih/rygel-ruih-protocol-elem.vala b/src/librygel-ruih/rygel-ruih-protocol-elem.vala
index 8de200c..346fb59 100644
--- a/src/librygel-ruih/rygel-ruih-protocol-elem.vala
+++ b/src/librygel-ruih/rygel-ruih-protocol-elem.vala
@@ -83,7 +83,7 @@ protected class ProtocolElem : UIListing {
return this.protocol_info;
}
- public override bool match (Gee.ArrayList<ProtocolElem> protocols,
+ public override bool match (Gee.ArrayList<ProtocolElem>? protocols,
Gee.ArrayList filters) {
if (protocols == null || protocols.size == 0) {
return true;
diff --git a/src/librygel-ruih/rygel-ruih-ui-elem.vala b/src/librygel-ruih/rygel-ruih-ui-elem.vala
index 112924e..a594bf9 100644
--- a/src/librygel-ruih/rygel-ruih-ui-elem.vala
+++ b/src/librygel-ruih/rygel-ruih-ui-elem.vala
@@ -93,7 +93,7 @@ protected class UIElem : UIListing
}
}
- public override bool match (Gee.ArrayList<ProtocolElem> protocol_elements,
+ public override bool match (Gee.ArrayList<ProtocolElem>? protocol_elements,
Gee.ArrayList<FilterEntry> filters) {
if (protocol_elements == null || protocol_elements.size == 0) {
return true;
diff --git a/src/librygel-ruih/rygel-ruih-ui-listing.vala b/src/librygel-ruih/rygel-ruih-ui-listing.vala
index 5a95754..9f15595 100644
--- a/src/librygel-ruih/rygel-ruih-ui-listing.vala
+++ b/src/librygel-ruih/rygel-ruih-ui-listing.vala
@@ -43,7 +43,7 @@ public abstract class UIListing
protected static const string URI = "uri";
protected static const string UIID = "uiID";
- public abstract bool match (Gee.ArrayList<ProtocolElem> protocols,
+ public abstract bool match (Gee.ArrayList<ProtocolElem>? protocols,
Gee.ArrayList<FilterEntry> filters);
public abstract string to_ui_listing (Gee.ArrayList<FilterEntry> filters);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]