summaryrefslogtreecommitdiff
path: root/src/librygel-ruih
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2014-10-19 14:50:17 +0200
committerJens Georg <mail@jensge.org>2014-11-08 13:20:55 +0100
commit579d3e45682fb3e843d9abb4e15ef43122c5a9f5 (patch)
treee923aacc2d78746f050d810276398719f1ab2034 /src/librygel-ruih
parent59f22cc74562bf351e485f2c961323297005150f (diff)
downloadrygel-579d3e45682fb3e843d9abb4e15ef43122c5a9f5.tar.gz
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>
Diffstat (limited to 'src/librygel-ruih')
-rw-r--r--src/librygel-ruih/rygel-ruih-icon-elem.vala2
-rw-r--r--src/librygel-ruih/rygel-ruih-protocol-elem.vala2
-rw-r--r--src/librygel-ruih/rygel-ruih-ui-elem.vala2
-rw-r--r--src/librygel-ruih/rygel-ruih-ui-listing.vala2
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 556fd4cb..32c93c03 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 8de200cc..346fb596 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 112924e8..a594bf99 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 5a957546..9f155955 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);