performance tweaks
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 13 Aug 2004 18:06:42 +0000 (18:06 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 13 Aug 2004 18:06:42 +0000 (18:06 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@727 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/attribute.c
ltt/branches/poly/lttv/lttv/tracecontext.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c

index a0d30704fd804a785575502233da8de28e6c92f7..549858674c941404fc475060bda7c390083d02a4 100644 (file)
@@ -41,7 +41,8 @@ typedef struct _Attribute {
 } Attribute;
 
 
-LttvAttributeValue address_of_value(LttvAttributeType t, AttributeValue *v)
+static __inline LttvAttributeValue address_of_value(LttvAttributeType t,
+                                                    AttributeValue *v)
 {
   LttvAttributeValue va;
 
@@ -514,12 +515,12 @@ attribute_interface_init (gpointer g_iface, gpointer iface_data)
 
 }
 
-
 static void
 attribute_instance_init (GTypeInstance *instance, gpointer g_class)
 {
   LttvAttribute *self = (LttvAttribute *)instance;
-  self->names = g_hash_table_new(g_direct_hash, g_direct_equal);
+  self->names = g_hash_table_new(g_direct_hash,
+                                 g_direct_equal);
   self->attributes = g_array_new(FALSE, FALSE, sizeof(Attribute));
 }
 
index 2150ae3724600a7330e68837db5d924947947111..3af6045ca5606c3bc5665df205180624108430c5 100644 (file)
@@ -577,7 +577,7 @@ lttv_tracefile_context_get_type(void)
 
 
 
-gboolean get_first(gpointer key, gpointer value, gpointer user_data) {
+static gboolean get_first(gpointer key, gpointer value, gpointer user_data) {
   *((LttvTracefileContext **)user_data) = (LttvTracefileContext *)value;
   return TRUE;
 }
index 51fb7b2d8062d52b32b00ee7248088ee104a30f6..aa42477282a62f4e02ea39d2b548958f76c151a3 100644 (file)
@@ -880,10 +880,10 @@ gint find_viewer (const EventsRequest *a, gconstpointer b)
 void lttvwindow_events_request_remove_all(Tab       *tab,
                                           gconstpointer   viewer)
 {
-  GSList *element;
+  GSList *element = tab->events_requests;
   
   while((element = 
-            g_slist_find_custom(tab->events_requests, viewer,
+            g_slist_find_custom(element, viewer,
                                 (GCompareFunc)find_viewer))
               != NULL) {
     EventsRequest *events_request = (EventsRequest *)element->data;
@@ -895,6 +895,8 @@ void lttvwindow_events_request_remove_all(Tab       *tab,
     //}
     g_free(events_request);
     tab->events_requests = g_slist_remove_link(tab->events_requests, element);
+    element = g_slist_next(element);
+    if(element == NULL) break;   /* end of list */
   }
   if(g_slist_length(tab->events_requests) == 0) {
     tab->events_request_pending = FALSE;
This page took 0.025631 seconds and 4 git commands to generate.