[rygel] core: Make use of reference passing in XBoxHacks API
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Make use of reference passing in XBoxHacks API
- Date: Thu, 1 Apr 2010 22:55:20 +0000 (UTC)
commit 3454f88ef0ab03cd0ad1c35db97c273aac21f20a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Mar 24 18:20:18 2010 +0200
core: Make use of reference passing in XBoxHacks API
src/rygel/rygel-search.vala | 3 +--
src/rygel/rygel-xbox-hacks.vala | 6 ++----
2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/rygel/rygel-search.vala b/src/rygel/rygel-search.vala
index 220eb93..bd21b8a 100644
--- a/src/rygel/rygel-search.vala
+++ b/src/rygel/rygel-search.vala
@@ -96,8 +96,7 @@ internal class Rygel.Search: GLib.Object, Rygel.StateMachine {
debug ("Executing search request: %s", this.search_criteria);
if (this.xbox_hacks != null) {
- this.container_id = this.xbox_hacks.translate_container_id (
- this.container_id);
+ this.xbox_hacks.translate_container_id (ref this.container_id);
}
var container = yield this.fetch_container ();
diff --git a/src/rygel/rygel-xbox-hacks.vala b/src/rygel/rygel-xbox-hacks.vala
index 6ec251b..0662ed1 100644
--- a/src/rygel/rygel-xbox-hacks.vala
+++ b/src/rygel/rygel-xbox-hacks.vala
@@ -34,15 +34,13 @@ internal class Rygel.XBoxHacks : GLib.Object {
}
}
- public string translate_container_id (string container_id) {
+ public void translate_container_id (ref string container_id) {
if (container_id == "1" ||
container_id == "4" ||
container_id == "5" ||
container_id == "6" ||
container_id == "7") {
- return "0";
- } else {
- return container_id;
+ container_id = "0";
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]