Commit 539927eb authored by Michael Natterer's avatar Michael Natterer 😴

app: replace all g_assert() by the newly added gimp_assert()

which is just a #define to g_assert for now, but can now easily be
turned into something that does some nicer debugging using our new
stack trace infrastructure. This commit also reverts all constructed()
functions to use assert again.
parent 6db5ba61
......@@ -49,4 +49,11 @@ typedef struct _GimpGrid GimpGrid;
typedef struct _GimpTemplate GimpTemplate;
/* for now these are defines, but can be turned into something
* fancier for nicer debugging
*/
#define gimp_assert g_assert
#define gimp_assert_not_reached g_assert_not_reached
#endif /* __CONFIG_TYPES_H__ */
......@@ -542,7 +542,7 @@ gimp_dialog_config_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (priv->gimp));
gimp_assert (GIMP_IS_GIMP (priv->gimp));
context = gimp_get_user_context (priv->gimp);
......
......@@ -273,7 +273,7 @@ gimp_internal_data_save_data_file (Gimp *gimp,
* gradients, so this is not a big concern, but if we save more expensive
* data in the future, we should fix this.
*/
g_return_val_if_fail (GIMP_DATA_GET_CLASS (data)->save, FALSE);
gimp_assert (GIMP_DATA_GET_CLASS (data)->save);
success = GIMP_DATA_GET_CLASS (data)->save (data, output, error);
g_object_unref (output);
......
......@@ -461,7 +461,7 @@ unescape_gstring (GString *string)
}
}
g_return_val_if_fail (to - string->str <= string->len, FALSE);
gimp_assert (to - string->str <= string->len);
if (to - string->str != string->len)
g_string_truncate (string, to - string->str);
......
......@@ -103,7 +103,7 @@ gimp_brush_cache_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (cache->data_destroy != NULL);
gimp_assert (cache->data_destroy != NULL);
}
static void
......
......@@ -111,7 +111,7 @@ gimp_brush_clipboard_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_GIMP (brush->gimp));
gimp_assert (GIMP_IS_GIMP (brush->gimp));
g_signal_connect_object (brush->gimp, "clipboard-changed",
G_CALLBACK (gimp_brush_clipboard_changed),
......
......@@ -65,7 +65,7 @@ gimp_channel_prop_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
channel = GIMP_CHANNEL (GIMP_ITEM_UNDO (object)->item);
......
......@@ -106,7 +106,7 @@ gimp_channel_undo_constructed (GObject *object)
{
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
}
static void
......
......@@ -846,7 +846,7 @@ gimp_context_constructed (GObject *object)
gimp = GIMP_CONTEXT (object)->gimp;
g_return_if_fail (GIMP_IS_GIMP (gimp));
gimp_assert (GIMP_IS_GIMP (gimp));
gimp->context_list = g_list_prepend (gimp->context_list, object);
......
......@@ -100,7 +100,7 @@ gimp_drawable_mod_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
item = GIMP_ITEM_UNDO (object)->item;
drawable = GIMP_DRAWABLE (item);
......
......@@ -104,8 +104,8 @@ gimp_drawable_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_DRAWABLE));
gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_DRAWABLE));
gimp_container_add_handler (container, "update",
G_CALLBACK (gimp_drawable_stack_drawable_update),
......
......@@ -111,8 +111,8 @@ gimp_drawable_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
g_return_if_fail (GEGL_IS_BUFFER (drawable_undo->buffer));
gimp_assert (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GEGL_IS_BUFFER (drawable_undo->buffer));
}
static void
......
......@@ -124,7 +124,7 @@ gimp_filtered_container_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_CONTAINER (filtered_container->src_container));
gimp_assert (GIMP_IS_CONTAINER (filtered_container->src_container));
if (! gimp_container_frozen (filtered_container->src_container))
{
......
......@@ -83,8 +83,8 @@ gimp_filter_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_FILTER));
gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_FILTER));
gimp_container_add_handler (container, "active-changed",
G_CALLBACK (gimp_filter_stack_filter_active),
......
......@@ -68,7 +68,7 @@ gimp_floating_selection_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
layer = GIMP_LAYER (GIMP_ITEM_UNDO (object)->item);
......
......@@ -89,7 +89,7 @@ gimp_guide_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_GUIDE (guide_undo->guide));
gimp_assert (GIMP_IS_GUIDE (guide_undo->guide));
guide_undo->orientation = gimp_guide_get_orientation (guide_undo->guide);
guide_undo->position = gimp_guide_get_position (guide_undo->guide);
......
......@@ -1910,12 +1910,12 @@ update_box_rgb (const CFHistogram histogram,
/*
fprintf(stderr, " %d,%d", dummyqo.cmap[0].blue, boxp->Bmax);
g_assert(boxp->Rhalferror >= boxp->Rmin);
g_assert(boxp->Rhalferror < boxp->Rmax);
g_assert(boxp->Ghalferror >= boxp->Gmin);
g_assert(boxp->Ghalferror < boxp->Gmax);
g_assert(boxp->Bhalferror >= boxp->Bmin);
g_assert(boxp->Bhalferror < boxp->Bmax);*/
gimp_assert (boxp->Rhalferror >= boxp->Rmin);
gimp_assert (boxp->Rhalferror < boxp->Rmax);
gimp_assert (boxp->Ghalferror >= boxp->Gmin);
gimp_assert (boxp->Ghalferror < boxp->Gmax);
gimp_assert (boxp->Bhalferror >= boxp->Bmin);
gimp_assert (boxp->Bhalferror < boxp->Bmax);*/
/*boxp->error = (sqrt((double)(boxp->error/ccount)));*/
/* boxp->rerror = (sqrt((double)((boxp->rerror)/ccount)));
......
......@@ -818,7 +818,7 @@ gimp_image_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_GIMP (image->gimp));
gimp_assert (GIMP_IS_GIMP (image->gimp));
config = image->gimp->config;
......
......@@ -179,7 +179,7 @@ gimp_image_undo_constructed (GObject *object)
break;
case GIMP_UNDO_IMAGE_GRID:
g_return_if_fail (GIMP_IS_GRID (image_undo->grid));
gimp_assert (GIMP_IS_GRID (image_undo->grid));
break;
case GIMP_UNDO_IMAGE_COLORMAP:
......@@ -199,7 +199,7 @@ gimp_image_undo_constructed (GObject *object)
case GIMP_UNDO_PARASITE_ATTACH:
case GIMP_UNDO_PARASITE_REMOVE:
g_return_if_fail (image_undo->parasite_name != NULL);
gimp_assert (image_undo->parasite_name != NULL);
image_undo->parasite = gimp_parasite_copy
(gimp_image_parasite_find (image, image_undo->parasite_name));
......
......@@ -364,8 +364,8 @@ gimp_item_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_IMAGE (private->image));
g_return_if_fail (private->ID != 0);
gimp_assert (GIMP_IS_IMAGE (private->image));
gimp_assert (private->ID != 0);
}
static void
......
......@@ -141,7 +141,7 @@ gimp_item_prop_undo_constructed (GObject *object)
case GIMP_UNDO_PARASITE_ATTACH:
case GIMP_UNDO_PARASITE_REMOVE:
g_return_if_fail (item_prop_undo->parasite_name != NULL);
gimp_assert (item_prop_undo->parasite_name != NULL);
item_prop_undo->parasite = gimp_parasite_copy
(gimp_item_parasite_find (item, item_prop_undo->parasite_name));
......
......@@ -73,8 +73,8 @@ gimp_item_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_ITEM));
gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_ITEM));
}
static void
......
......@@ -150,10 +150,10 @@ gimp_item_tree_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_IMAGE (private->image));
g_return_if_fail (g_type_is_a (private->container_type, GIMP_TYPE_ITEM_STACK));
g_return_if_fail (g_type_is_a (private->item_type, GIMP_TYPE_ITEM));
g_return_if_fail (private->item_type != GIMP_TYPE_ITEM);
gimp_assert (GIMP_IS_IMAGE (private->image));
gimp_assert (g_type_is_a (private->container_type, GIMP_TYPE_ITEM_STACK));
gimp_assert (g_type_is_a (private->item_type, GIMP_TYPE_ITEM));
gimp_assert (private->item_type != GIMP_TYPE_ITEM);
tree->container = g_object_new (private->container_type,
"name", g_type_name (private->item_type),
......
......@@ -84,7 +84,7 @@ gimp_item_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_ITEM (item_undo->item));
gimp_assert (GIMP_IS_ITEM (item_undo->item));
}
static void
......
......@@ -65,7 +65,7 @@ gimp_layer_mask_prop_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
layer = GIMP_LAYER (GIMP_ITEM_UNDO (object)->item);
......
......@@ -95,8 +95,8 @@ gimp_layer_mask_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
g_return_if_fail (GIMP_IS_LAYER_MASK (layer_mask_undo->layer_mask));
gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_LAYER_MASK (layer_mask_undo->layer_mask));
}
static void
......
......@@ -65,7 +65,7 @@ gimp_layer_prop_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
layer = GIMP_LAYER (GIMP_ITEM_UNDO (object)->item);
......
......@@ -85,8 +85,8 @@ gimp_layer_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_LAYER));
gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_LAYER));
gimp_container_add_handler (container, "active-changed",
G_CALLBACK (gimp_layer_stack_layer_active),
......
......@@ -104,7 +104,7 @@ gimp_layer_undo_constructed (GObject *object)
{
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
}
static void
......
......@@ -100,7 +100,7 @@ gimp_mask_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
gimp_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
item = GIMP_ITEM_UNDO (object)->item;
drawable = GIMP_DRAWABLE (item);
......
......@@ -103,7 +103,7 @@ gimp_pattern_clipboard_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_GIMP (pattern->gimp));
gimp_assert (GIMP_IS_GIMP (pattern->gimp));
g_signal_connect_object (pattern->gimp, "clipboard-changed",
G_CALLBACK (gimp_pattern_clipboard_changed),
......
......@@ -177,8 +177,8 @@ gimp_pdb_progress_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_PDB (progress->pdb));
g_return_if_fail (GIMP_IS_CONTEXT (progress->context));
gimp_assert (GIMP_IS_PDB (progress->pdb));
gimp_assert (GIMP_IS_CONTEXT (progress->context));
}
static void
......
......@@ -89,7 +89,7 @@ gimp_sample_point_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (sample_point_undo->sample_point != NULL);
gimp_assert (sample_point_undo->sample_point != NULL);
gimp_sample_point_get_position (sample_point_undo->sample_point,
&sample_point_undo->x,
......
......@@ -184,7 +184,7 @@ gimp_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_return_if_fail (GIMP_IS_IMAGE (undo->image));
gimp_assert (GIMP_IS_IMAGE (undo->image));
}
static void
......
......@@ -2925,7 +2925,7 @@ prefs_dialog_new (Gimp *gimp,
gint format;
g_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (format_names));
gimp_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (format_names));
formats[0].current_setting = display_config->image_title_format;
formats[1].current_setting = display_config->image_status_format;
......
......@@ -382,7 +382,7 @@ static void
tips_parser_end_markup (TipsParser *parser,
const gchar *markup_name)
{
g_assert (parser->markup_depth > 0);
gimp_assert (parser->markup_depth > 0);
parser->markup_depth--;
g_string_append_printf (parser->value, "</%s>", markup_name);
......@@ -401,7 +401,7 @@ tips_parser_start_unknown (TipsParser *parser)
static void
tips_parser_end_unknown (TipsParser *parser)
{
g_assert (parser->unknown_depth > 0 && parser->state == TIPS_IN_UNKNOWN);
gimp_assert (parser->unknown_depth > 0 && parser->state == TIPS_IN_UNKNOWN);
parser->unknown_depth--;
......
......@@ -402,7 +402,7 @@ gimp_canvas_handle_draw (GimpCanvasItem *item,
break;
default:
g_assert_not_reached ();
gimp_assert_not_reached ();
}
cairo_restore (cr);
......
......@@ -184,7 +184,7 @@ gimp_canvas_item_constructed (GObject *object)
{
GimpCanvasItem *item = GIMP_CANVAS_ITEM (object);
g_assert (GIMP_IS_DISPLAY_SHELL (item->private->shell));
gimp_assert (GIMP_IS_DISPLAY_SHELL (item->private->shell));
item->private->change_count = 0; /* undo hack from init() */
......
......@@ -220,12 +220,6 @@ gimp_display_set_property (GObject *object,
}
break;
case PROP_ID:
case PROP_IMAGE:
case PROP_SHELL:
g_assert_not_reached ();
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -397,8 +397,8 @@ gimp_display_shell_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_UI_MANAGER (shell->popup_manager));
g_assert (GIMP_IS_DISPLAY (shell->display));
gimp_assert (GIMP_IS_UI_MANAGER (shell->popup_manager));
gimp_assert (GIMP_IS_DISPLAY (shell->display));
config = shell->display->config;
image = gimp_display_get_image (shell->display);
......
......@@ -69,8 +69,8 @@ rtree_node_create (RTree *rtree,
{
RTreeNode *node;
g_assert (x >= 0 && x+w <= rtree->root.w);
g_assert (y >= 0 && y+h <= rtree->root.h);
gimp_assert (x >= 0 && x+w <= rtree->root.w);
gimp_assert (y >= 0 && y+h <= rtree->root.h);
node = g_slice_alloc (sizeof (*node));
if (node == NULL)
......@@ -271,8 +271,8 @@ gimp_display_xfer_get_surface (GimpDisplayXfer *xfer,
{
RTreeNode *node;
g_assert (w <= GIMP_DISPLAY_RENDER_BUF_WIDTH &&
h <= GIMP_DISPLAY_RENDER_BUF_HEIGHT);
gimp_assert (w <= GIMP_DISPLAY_RENDER_BUF_WIDTH &&
h <= GIMP_DISPLAY_RENDER_BUF_HEIGHT);
node = rtree_insert (&xfer->rtree, w, h);
if (node == NULL)
......@@ -282,7 +282,7 @@ gimp_display_xfer_get_surface (GimpDisplayXfer *xfer,
rtree_reset (&xfer->rtree);
cairo_surface_mark_dirty (xfer->render_surface[xfer->page]); /* XXX */
node = rtree_insert (&xfer->rtree, w, h);
g_assert (node != NULL);
gimp_assert (node != NULL);
}
*src_x = node->x;
......
......@@ -378,8 +378,8 @@ gimp_image_window_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (private->gimp));
g_assert (GIMP_IS_DIALOG_FACTORY (private->dialog_factory));
gimp_assert (GIMP_IS_GIMP (private->gimp));
gimp_assert (GIMP_IS_DIALOG_FACTORY (private->dialog_factory));
menu_factory = gimp_dialog_factory_get_menu_factory (private->dialog_factory);
......@@ -1904,7 +1904,7 @@ gimp_image_window_update_ui_manager_idle (GimpImageWindow *window)
{
GimpImageWindowPrivate *private = GIMP_IMAGE_WINDOW_GET_PRIVATE (window);
g_assert (private->active_shell != NULL);
gimp_assert (private->active_shell != NULL);
gimp_ui_manager_update (private->menubar_manager,
private->active_shell->display);
......
......@@ -581,7 +581,7 @@ gimp_navigation_editor_scroll (GimpNavigationView *view,
break;
}
g_assert (adj != NULL);
gimp_assert (adj != NULL);
value = gtk_adjustment_get_value (adj);
......
......@@ -1101,7 +1101,7 @@ gimp_tool_line_get_slider (GimpToolLine *line,
{
GimpToolLinePrivate *private = line->private;
g_assert (slider >= 0 && slider < private->sliders->len);
gimp_assert (slider >= 0 && slider < private->sliders->len);
return &g_array_index (private->sliders, GimpControllerSlider, slider);
}
......@@ -1124,8 +1124,8 @@ gimp_tool_line_get_handle (GimpToolLine *line,
return private->end_handle;
default:
g_assert (handle >= 0 &&
handle < (gint) private->slider_handles->len);
gimp_assert (handle >= 0 &&
handle < (gint) private->slider_handles->len);
return g_array_index (private->slider_handles,
GimpCanvasItem *, handle);
......@@ -1198,7 +1198,7 @@ gimp_tool_line_selection_motion (GimpToolLine *line,
switch (private->selection)
{
case GIMP_TOOL_LINE_HANDLE_NONE:
g_assert_not_reached ();
gimp_assert_not_reached ();
case GIMP_TOOL_LINE_HANDLE_START:
if (constrain)
......
......@@ -1429,7 +1429,7 @@ gimp_tool_transform_grid_motion (GimpToolWidget *widget,
this = 3; left = 2; right = 1; opposite = 0;
}
else
g_assert_not_reached ();
gimp_assert_not_reached ();
/* when the keep aspect transformation constraint is enabled,
* the translation shall only be along the diagonal that runs
......@@ -1533,7 +1533,7 @@ gimp_tool_transform_grid_motion (GimpToolWidget *widget,
this_l = 0; this_r = 2;
}
else
g_assert_not_reached ();
gimp_assert_not_reached ();
opp_l = 3 - this_r; opp_r = 3 - this_l;
......@@ -1619,7 +1619,7 @@ gimp_tool_transform_grid_motion (GimpToolWidget *widget,
this_l = 3; this_r = 1;
}
else
g_assert_not_reached ();
gimp_assert_not_reached ();
if (private->constrain_shear)
{
......@@ -1670,7 +1670,7 @@ gimp_tool_transform_grid_motion (GimpToolWidget *widget,
this = 3; left = 2; right = 1; opposite = 0;
}
else
g_assert_not_reached ();
gimp_assert_not_reached ();
if (private->constrain_perspective)
{
......@@ -1781,7 +1781,7 @@ get_friendly_operation_name (GimpTransformHandle handle)
case GIMP_TRANSFORM_HANDLE_ROTATION:
return _("Click-Drag to rotate");
default:
g_assert_not_reached ();
gimp_assert_not_reached ();
}
}
......@@ -2157,7 +2157,7 @@ gimp_tool_transform_grid_get_cursor (GimpToolWidget *widget,
flip = TRUE;
break;
default:
g_assert_not_reached ();
gimp_assert_not_reached ();
}
if (flip)
......
......@@ -200,7 +200,7 @@ gimp_tool_widget_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_DISPLAY_SHELL (private->shell));
gimp_assert (GIMP_IS_DISPLAY_SHELL (private->shell));
private->item = gimp_canvas_group_new (private->shell);
}
......
......@@ -362,7 +362,7 @@ file_remote_progress_callback (goffset current_num_bytes,
break;
default:
g_assert_not_reached ();
gimp_assert_not_reached ();
}
gimp_progress_set_text (progress->progress, format, done, total);
......@@ -389,7 +389,7 @@ file_remote_progress_callback (goffset current_num_bytes,
break;
default:
g_assert_not_reached ();
gimp_assert_not_reached ();
}
gimp_progress_set_text (progress->progress, format, done);
......
......@@ -438,7 +438,7 @@ gimp_gegl_apply_border (GeglBuffer *src_buffer,
break;
default:
g_assert_not_reached ();
gimp_assert_not_reached ();
}
gimp_gegl_apply_operation (src_buffer, progress, undo_desc,
......
......@@ -409,7 +409,7 @@ gimp_ui_configurer_move_docks_to_window (GimpUIConfigurer *ui_configurer,
}
else
{
g_assert_not_reached ();
gimp_assert_not_reached ();
}
gtk_window_parse_geometry (GTK_WINDOW (dock_window), geometry);
......
......@@ -1107,7 +1107,7 @@ gimp_layer_modes_init (void)
for (i = 0; i < G_N_ELEMENTS (layer_mode_infos); i++)
{
g_assert ((GimpLayerMode) i == layer_mode_infos[i].layer_mode);
gimp_assert ((GimpLayerMode) i == layer_mode_infos[i].layer_mode);
}
}
......
......@@ -571,8 +571,8 @@ gimp_operation_layer_mode_real_process (GeglOperation *operation,
if (blend_space != GIMP_LAYER_COLOR_SPACE_AUTO)
{
g_assert (composite_space >= 1 && composite_space < 4);
g_assert (blend_space >= 1 && blend_space < 4);
gimp_assert (composite_space >= 1 && composite_space < 4);
gimp_assert (blend_space >= 1 && blend_space < 4);
composite_to_blend_fish = gimp_layer_color_space_fish [composite_space - 1]
[blend_space - 1];
......
......@@ -228,7 +228,7 @@ gimp_brush_core_init (GimpBrushCore *core)
BRUSH_CORE_JITTER_LUTSIZE));
}
g_assert (BRUSH_CORE_SUBSAMPLE == KERNEL_SUBSAMPLE);
gimp_assert (BRUSH_CORE_SUBSAMPLE == KERNEL_SUBSAMPLE);
for (i = 0; i < KERNEL_SUBSAMPLE + 1; i++)
{
......
......@@ -69,7 +69,7 @@ gimp_ink_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_INK (GIMP_PAINT_CORE_UNDO (ink_undo)->paint_core));
gimp_assert (GIMP_IS_INK (GIMP_PAINT_CORE_UNDO (ink_undo)->paint_core));
ink = GIMP_INK (GIMP_PAINT_CORE_UNDO (ink_undo)->paint_core);
......
......@@ -87,7 +87,7 @@ gimp_paint_core_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_PAINT_CORE (paint_core_undo->paint_core));
gimp_assert (GIMP_IS_PAINT_CORE (paint_core_undo->paint_core));
paint_core_undo->last_coords = paint_core_undo->paint_core->start_coords;
......