[tracker] Fix build with stricter Vala 0.7.2



commit d456ca88ca48fc6718ec0b1912d3aa50c6750404
Author: Jürg Billeter <j bitron ch>
Date:   Fri May 8 09:02:51 2009 +0200

    Fix build with stricter Vala 0.7.2
---
 src/libtracker-data/tracker-sparql-query.vala |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index 251989b..78e953e 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -1156,14 +1156,13 @@ public class Tracker.SparqlQuery : Object {
 
 	static string? get_string_for_value (Value value)
 	{
-		switch (value.type ()) {
-		case typeof (int):
+		if (value.type () == typeof (int)) {
 			return value.get_int ().to_string ();
-		case typeof (double):
+		} else if (value.type () == typeof (double)) {
 			return value.get_double ().to_string ();
-		case typeof (string):
+		} else if (value.type () == typeof (string)) {
 			return value.get_string ();
-		default:
+		} else {
 			return null;
 		}
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]