mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-02 22:29:38 +02:00
Tiny speed improvement suggested by noon@users.sourceforge.net.
2001-05-23 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * garray.c (g_array_remove_index_fast): Tiny speed improvement suggested by noon@users.sourceforge.net. * glib/tmpl/arrays.sgml, glib/tmpl/arrays_pointers.sgml, glib/tmpl/arrays_byte.sgml: Corrected documentation for the ..._sized_new functions. Discovered by noon@users.sourceforge.net.
This commit is contained in:
committed by
Sebastian Wilhelmi
parent
475193bda8
commit
ef49296716
@@ -254,9 +254,9 @@ g_array_remove_index_fast (GArray* farray,
|
||||
g_return_val_if_fail (index < array->len, NULL);
|
||||
|
||||
if (index != array->len - 1)
|
||||
g_memmove (g_array_elt_pos (array, index),
|
||||
g_array_elt_pos (array, array->len - 1),
|
||||
g_array_elt_len (array, 1));
|
||||
memcpy (g_array_elt_pos (array, index),
|
||||
g_array_elt_pos (array, array->len - 1),
|
||||
g_array_elt_len (array, 1));
|
||||
|
||||
array->len -= 1;
|
||||
|
||||
|
Reference in New Issue
Block a user