diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-05-04 03:16:28 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-05-04 03:16:28 +0000 |
commit | 00dd821a5a738981b20662bc2a0a0f26f32b94e9 (patch) | |
tree | 89361c4c8d2114dbf8312079123269311868ac65 /gtk/gtkfilesystem.c | |
parent | 2c5634dad18a75ffc16b0653b662193d48b7de3c (diff) | |
download | gtk+-00dd821a5a738981b20662bc2a0a0f26f32b94e9.tar.gz |
Avoid getting the interface struct twice in the same function. (#300513,
2005-05-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystem.c:
* gtk/gtkcelleditable.c:
* gtk/gtktreemodel.c: Avoid getting the interface struct
twice in the same function. (#300513, Billy Biggs)
Diffstat (limited to 'gtk/gtkfilesystem.c')
-rw-r--r-- | gtk/gtkfilesystem.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c index 93152407de..fa0560bcbd 100644 --- a/gtk/gtkfilesystem.c +++ b/gtk/gtkfilesystem.c @@ -790,9 +790,9 @@ gtk_file_system_get_bookmark_label (GtkFileSystem *file_system, g_return_val_if_fail (GTK_IS_FILE_SYSTEM (file_system), NULL); g_return_val_if_fail (path != NULL, FALSE); - if (GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_bookmark_label) - return GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_bookmark_label (file_system, - path); + GtkFileSystemIface *iface = GTK_FILE_SYSTEM_GET_IFACE (file_system); + if (iface->get_bookmark_label) + return iface->get_bookmark_label (file_system, path); return NULL; } @@ -816,10 +816,9 @@ gtk_file_system_set_bookmark_label (GtkFileSystem *file_system, g_return_if_fail (GTK_IS_FILE_SYSTEM (file_system)); g_return_if_fail (path != NULL); - if (GTK_FILE_SYSTEM_GET_IFACE (file_system)->set_bookmark_label) - GTK_FILE_SYSTEM_GET_IFACE (file_system)->set_bookmark_label (file_system, - path, - label); + GtkFileSystemIface *iface = GTK_FILE_SYSTEM_GET_IFACE (file_system); + if (iface->set_bookmark_label) + iface->set_bookmark_label (file_system, path, label); } /***************************************** @@ -939,10 +938,11 @@ gtk_file_folder_is_finished_loading (GtkFileFolder *folder) { g_return_val_if_fail (GTK_IS_FILE_FOLDER (folder), TRUE); - if (!GTK_FILE_FOLDER_GET_IFACE (folder)->is_finished_loading) + GtkFileFolderIface *iface = GTK_FILE_FOLDER_GET_IFACE (folder); + if (!iface->is_finished_loading) return TRUE; else - return GTK_FILE_FOLDER_GET_IFACE (folder)->is_finished_loading (folder); + return iface->is_finished_loading (folder); } |