diff options
author | Vyas Giridharan <vyasgiridhar27@gmail.com> | 2017-09-01 09:26:12 +0530 |
---|---|---|
committer | Ernestas Kulik <ernestask@gnome.org> | 2017-09-02 12:17:26 +0300 |
commit | 7b51ed65c967aa489e4eadb25dbd0e11ade0a1b2 (patch) | |
tree | 1ef08d3bba81d5fe1bb2a24bf6c83aea8baa368f /src/nautilus-list-model.c | |
parent | a5b86941fe5cf550646998937ab8047ae507a2fa (diff) | |
download | nautilus-7b51ed65c967aa489e4eadb25dbd0e11ade0a1b2.tar.gz |
list-model: use macro for type casting
This patch converts all type casting to use the generated GLib macro
for consistency throughout the codebase.
https://bugzilla.gnome.org/show_bug.cgi?id=786866
Diffstat (limited to 'src/nautilus-list-model.c')
-rw-r--r-- | src/nautilus-list-model.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nautilus-list-model.c b/src/nautilus-list-model.c index 6b0529de3..177491dac 100644 --- a/src/nautilus-list-model.c +++ b/src/nautilus-list-model.c @@ -224,7 +224,7 @@ nautilus_list_model_get_iter (GtkTreeModel *tree_model, FileEntry *file_entry; int i, d; - model = (NautilusListModel *) tree_model; + model = NAUTILUS_LIST_MODEL (tree_model); priv = nautilus_list_model_get_instance_private (model); ptr = NULL; @@ -258,7 +258,7 @@ nautilus_list_model_get_path (GtkTreeModel *tree_model, GSequenceIter *ptr; FileEntry *file_entry; - model = (NautilusListModel *) tree_model; + model = NAUTILUS_LIST_MODEL (tree_model); priv = nautilus_list_model_get_instance_private (model); g_return_val_if_fail (iter->stamp == priv->stamp, NULL); @@ -347,7 +347,7 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model, NautilusFileIconFlags flags; cairo_surface_t *surface; - model = (NautilusListModel *) tree_model; + model = NAUTILUS_LIST_MODEL (tree_model); priv = nautilus_list_model_get_instance_private (model); g_return_if_fail (priv->stamp == iter->stamp); @@ -486,7 +486,7 @@ nautilus_list_model_iter_next (GtkTreeModel *tree_model, NautilusListModel *model; NautilusListModelPrivate *priv; - model = (NautilusListModel *) tree_model; + model = NAUTILUS_LIST_MODEL (tree_model); priv = nautilus_list_model_get_instance_private (model); g_return_val_if_fail (priv->stamp == iter->stamp, FALSE); @@ -506,7 +506,7 @@ nautilus_list_model_iter_children (GtkTreeModel *tree_model, GSequence *files; FileEntry *file_entry; - model = (NautilusListModel *) tree_model; + model = NAUTILUS_LIST_MODEL (tree_model); priv = nautilus_list_model_get_instance_private (model); if (parent == NULL) @@ -555,7 +555,7 @@ nautilus_list_model_iter_n_children (GtkTreeModel *tree_model, GSequence *files; FileEntry *file_entry; - model = (NautilusListModel *) tree_model; + model = NAUTILUS_LIST_MODEL (tree_model); priv = nautilus_list_model_get_instance_private (model); if (iter == NULL) @@ -583,7 +583,7 @@ nautilus_list_model_iter_nth_child (GtkTreeModel *tree_model, GSequence *files; FileEntry *file_entry; - model = (NautilusListModel *) tree_model; + model = NAUTILUS_LIST_MODEL (tree_model); priv = nautilus_list_model_get_instance_private (model); if (parent != NULL) @@ -618,7 +618,7 @@ nautilus_list_model_iter_parent (GtkTreeModel *tree_model, NautilusListModelPrivate *priv; FileEntry *file_entry; - model = (NautilusListModel *) tree_model; + model = NAUTILUS_LIST_MODEL (tree_model); priv = nautilus_list_model_get_instance_private (model); file_entry = g_sequence_get (child->user_data); @@ -778,7 +778,7 @@ nautilus_list_model_file_entry_compare_func (gconstpointer a, NautilusListModelPrivate *priv; int result; - model = (NautilusListModel *) user_data; + model = NAUTILUS_LIST_MODEL (user_data); priv = nautilus_list_model_get_instance_private (model); file_entry1 = (FileEntry *) a; @@ -911,7 +911,7 @@ nautilus_list_model_get_sort_column_id (GtkTreeSortable *sortable, NautilusListModelPrivate *priv; int id; - model = (NautilusListModel *) sortable; + model = NAUTILUS_LIST_MODEL (sortable); priv = nautilus_list_model_get_instance_private (model); id = nautilus_list_model_get_sort_column_id_from_attribute (model, priv->sort_attribute); @@ -941,7 +941,7 @@ nautilus_list_model_set_sort_column_id (GtkTreeSortable *sortable, NautilusListModel *model; NautilusListModelPrivate *priv; - model = (NautilusListModel *) sortable; + model = NAUTILUS_LIST_MODEL (sortable); priv = nautilus_list_model_get_instance_private (model); priv->sort_attribute = nautilus_list_model_get_attribute_from_sort_column_id (model, sort_column_id); |