mirror of https://github.com/GNOME/gimp.git
use G_N_ELEMENTS().
2002-12-20 Michael Natterer <mitch@gimp.org> * app/xcf/xcf.c: use G_N_ELEMENTS().
This commit is contained in:
parent
f9213619b8
commit
12ad71944b
|
@ -1,3 +1,7 @@
|
|||
2002-12-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/xcf/xcf.c: use G_N_ELEMENTS().
|
||||
|
||||
2002-12-20 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/config/gimpconfig.c (gimp_config_serialize): check the return
|
||||
|
@ -10,7 +14,7 @@
|
|||
* app/xcf/xcf.c: ported the fix for bug #101340 over from the
|
||||
stable branch. Uses GError to report errors, unlike the stable
|
||||
version, which uses a pointer to gboolean.
|
||||
|
||||
|
||||
* app/xcf/xcf-seek.[ch]: check the return value of fseek and ftell
|
||||
for errors. Return FALSE and set GError if an error is detected.
|
||||
|
||||
|
|
|
@ -156,11 +156,10 @@ static PlugInProcDef xcf_plug_in_save_proc =
|
|||
|
||||
static GimpXcfLoaderFunc *xcf_loaders[] =
|
||||
{
|
||||
xcf_load_image, /* version 0 */
|
||||
xcf_load_image, /* version 0 */
|
||||
xcf_load_image, /* version 1 */
|
||||
xcf_load_image /* version 2 */
|
||||
};
|
||||
static gint n_xcf_loaders = sizeof (xcf_loaders) / sizeof (xcf_loaders[0]);
|
||||
|
||||
|
||||
void
|
||||
|
@ -250,7 +249,7 @@ xcf_load_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
if (info.file_version < n_xcf_loaders)
|
||||
if (info.file_version < G_N_ELEMENTS (xcf_loaders))
|
||||
{
|
||||
gimage = (*(xcf_loaders[info.file_version])) (gimp, &info);
|
||||
|
||||
|
|
Loading…
Reference in New Issue