[tracker/parser] Small performance improvement



commit 93c2b6bf006ac50dd8032ca3f7556a1d75937eb2
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Aug 13 12:01:44 2009 +0200

    Small performance improvement

 src/libtracker-data/tracker-sparql-scanner.vala |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-scanner.vala b/src/libtracker-data/tracker-sparql-scanner.vala
index 9dbfbff..e7241cc 100644
--- a/src/libtracker-data/tracker-sparql-scanner.vala
+++ b/src/libtracker-data/tracker-sparql-scanner.vala
@@ -685,8 +685,7 @@ public class Tracker.SparqlScanner : Object {
 
 	bool matches (char* begin, string keyword) {
 		char* keyword_array = keyword;
-		long len = keyword.len ();
-		for (int i = 0; i < len; i++) {
+		for (int i = 0; keyword_array[i] != 0; i++) {
 			if (begin[i].toupper () != keyword_array[i]) {
 				return false;
 			}



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