Commit 5978e395 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

don't call va_arg() too often.

2005-04-27  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpunitstore.c: don't call va_arg() too often.

	* libgimpconfig/gimpcolorconfig.c (gimp_color_config_finalize):
	free the string allocated for the display module.
parent cc3c29be
2005-04-27 Sven Neumann <sven@gimp.org>
* app/widgets/gimpunitstore.c: don't call va_arg() too often.
* libgimpconfig/gimpcolorconfig.c (gimp_color_config_finalize):
free the string allocated for the display module.
2005-04-27 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/image.pdb: plugged a small memleak.
* app/pdb/image_cmds.c: regenerated.
2005-04-27 Sven Neumann <sven@gimp.org>
* plug-ins/helpbrowser/dialog.c: added more standard keybindings.
......
......@@ -465,11 +465,12 @@ gimp_unit_store_set_pixel_values (GimpUnitStore *store,
va_start (args, first_value);
for (i = 0; i < store->num_values; i++)
for (i = 0; i < store->num_values; )
{
store->values[i] = first_value;
first_value = va_arg (args, gdouble);
if (++i < store->num_values)
first_value = va_arg (args, gdouble);
}
va_end (args);
......@@ -498,11 +499,12 @@ gimp_unit_store_set_resolutions (GimpUnitStore *store,
va_start (args, first_resolution);
for (i = 0; i < store->num_values; i++)
for (i = 0; i < store->num_values; )
{
store->resolutions[i] = first_resolution;
first_resolution = va_arg (args, gdouble);
if (++i < store->num_values)
first_resolution = va_arg (args, gdouble);
}
va_end (args);
......@@ -542,12 +544,13 @@ gimp_unit_store_get_values (GimpUnitStore *store,
va_start (args, first_value);
for (i = 0; i < store->num_values; i++)
for (i = 0; i < store->num_values; )
{
if (first_value)
*first_value = gimp_unit_store_get_value (store, unit, i);
first_value = va_arg (args, gdouble *);
if (++i < store->num_values)
first_value = va_arg (args, gdouble *);
}
va_end (args);
......
......@@ -207,10 +207,20 @@ gimp_color_config_finalize (GObject *object)
{
GimpColorConfig *color_config = GIMP_COLOR_CONFIG (object);
g_free (color_config->rgb_profile);
g_free (color_config->cmyk_profile);
g_free (color_config->display_profile);
g_free (color_config->printer_profile);
if (color_config->rgb_profile)
g_free (color_config->rgb_profile);
if (color_config->cmyk_profile)
g_free (color_config->cmyk_profile);
if (color_config->display_profile)
g_free (color_config->display_profile);
if (color_config->printer_profile)
g_free (color_config->printer_profile);
if (color_config->display_module)
g_free (color_config->display_module);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment