[tracker/domain-specific-indexes] squash fix
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/domain-specific-indexes] squash fix
- Date: Thu, 1 Jul 2010 14:21:27 +0000 (UTC)
commit 2379c8b078771575c36898168f979d32136e2114
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Jul 1 16:19:48 2010 +0200
squash fix
src/libtracker-data/tracker-data-update.c | 42 +++++++++-------------------
1 files changed, 14 insertions(+), 28 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 6fa50e4..57a302c 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -1349,16 +1349,13 @@ string_to_gvalue (const gchar *value,
}
static gboolean
-resource_in_domain_index (TrackerClass **domain_index_classes)
+resource_in_domain_index_class (TrackerClass *domain_index_class)
{
- while (*domain_index_classes) {
- guint i;
- for (i = 0; i < resource_buffer->types->len; i++) {
- if (g_ptr_array_index (resource_buffer->types, i) == *domain_index_classes) {
- return TRUE;
- }
+ guint i;
+ for (i = 0; i < resource_buffer->types->len; i++) {
+ if (g_ptr_array_index (resource_buffer->types, i) == domain_index_class) {
+ return TRUE;
}
- domain_index_classes++;
}
return FALSE;
}
@@ -1460,10 +1457,8 @@ cache_set_metadata_decomposed (TrackerProperty *property,
TrackerClass **domain_index_classes;
domain_index_classes = tracker_property_get_domain_indexes (property);
-
- if (resource_in_domain_index (domain_index_classes)) {
- domain_index_classes = tracker_property_get_domain_indexes (property);
- while (*domain_index_classes) {
+ while (*domain_index_classes) {
+ if (resource_in_domain_index_class (*domain_index_classes)) {
GValue gvalue_copy = { 0 };
g_value_init (&gvalue_copy, G_VALUE_TYPE (&gvalue));
@@ -1474,8 +1469,8 @@ cache_set_metadata_decomposed (TrackerProperty *property,
multiple_values,
tracker_property_get_fulltext_indexed (property),
tracker_property_get_data_type (property) == TRACKER_PROPERTY_TYPE_DATETIME);
- domain_index_classes++;
}
+ domain_index_classes++;
}
}
@@ -1535,20 +1530,16 @@ delete_metadata_decomposed (TrackerProperty *property,
domain_index_classes = tracker_property_get_domain_indexes (property);
- if (resource_in_domain_index (domain_index_classes)) {
- domain_index_classes = tracker_property_get_domain_indexes (property);
- while (*domain_index_classes) {
+ while (*domain_index_classes) {
+ if (resource_in_domain_index_class (*domain_index_classes)) {
GValue gvalue_copy = { 0 };
-
g_value_init (&gvalue_copy, G_VALUE_TYPE (&gvalue));
g_value_copy (&gvalue, &gvalue_copy);
-
cache_delete_value (tracker_class_get_name (*domain_index_classes), field_name, &gvalue_copy, multiple_values,
tracker_property_get_fulltext_indexed (property),
tracker_property_get_data_type (property) == TRACKER_PROPERTY_TYPE_DATETIME);
-
- domain_index_classes++;
}
+ domain_index_classes++;
}
}
@@ -1666,21 +1657,16 @@ cache_delete_resource_type (TrackerClass *class,
TrackerClass **domain_index_classes;
domain_index_classes = tracker_property_get_domain_indexes (prop);
-
- if (resource_in_domain_index (domain_index_classes)) {
- domain_index_classes = tracker_property_get_domain_indexes (prop);
- while (*domain_index_classes) {
+ while (*domain_index_classes) {
+ if (resource_in_domain_index_class (*domain_index_classes)) {
GValue gvalue_copy = { 0 };
-
g_value_init (&gvalue_copy, G_VALUE_TYPE (&gvalue));
g_value_copy (&gvalue, &gvalue_copy);
-
cache_delete_value (tracker_class_get_name (*domain_index_classes), field_name, &gvalue_copy, multiple_values,
tracker_property_get_fulltext_indexed (prop),
tracker_property_get_data_type (prop) == TRACKER_PROPERTY_TYPE_DATETIME);
-
- domain_index_classes++;
}
+ domain_index_classes++;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]