avoid repeated call of g_spaced_primes_closest() by moving it out of the

2002-03-20  Sven Neumann  <sven@gimp.org>

	* glib/ghash.c (g_hash_table_resize): avoid repeated call of
	g_spaced_primes_closest() by moving it out of the CLAMP macro
	(spotted by Salmaso Raffaele).
This commit is contained in:
Sven Neumann 2002-03-20 10:25:52 +00:00 committed by Sven Neumann
parent 3f4617caab
commit 73e6da92b2
8 changed files with 45 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2002-03-20 Sven Neumann <sven@gimp.org>
* glib/ghash.c (g_hash_table_resize): avoid repeated call of
g_spaced_primes_closest() by moving it out of the CLAMP macro
(spotted by Salmaso Raffaele).
2002-03-17 Tor Lillqvist <tml@iki.fi>
* README.win32: Add MSVC-specific text by Hans Breuer.

View File

@ -1,3 +1,9 @@
2002-03-20 Sven Neumann <sven@gimp.org>
* glib/ghash.c (g_hash_table_resize): avoid repeated call of
g_spaced_primes_closest() by moving it out of the CLAMP macro
(spotted by Salmaso Raffaele).
2002-03-17 Tor Lillqvist <tml@iki.fi>
* README.win32: Add MSVC-specific text by Hans Breuer.

View File

@ -1,3 +1,9 @@
2002-03-20 Sven Neumann <sven@gimp.org>
* glib/ghash.c (g_hash_table_resize): avoid repeated call of
g_spaced_primes_closest() by moving it out of the CLAMP macro
(spotted by Salmaso Raffaele).
2002-03-17 Tor Lillqvist <tml@iki.fi>
* README.win32: Add MSVC-specific text by Hans Breuer.

View File

@ -1,3 +1,9 @@
2002-03-20 Sven Neumann <sven@gimp.org>
* glib/ghash.c (g_hash_table_resize): avoid repeated call of
g_spaced_primes_closest() by moving it out of the CLAMP macro
(spotted by Salmaso Raffaele).
2002-03-17 Tor Lillqvist <tml@iki.fi>
* README.win32: Add MSVC-specific text by Hans Breuer.

View File

@ -1,3 +1,9 @@
2002-03-20 Sven Neumann <sven@gimp.org>
* glib/ghash.c (g_hash_table_resize): avoid repeated call of
g_spaced_primes_closest() by moving it out of the CLAMP macro
(spotted by Salmaso Raffaele).
2002-03-17 Tor Lillqvist <tml@iki.fi>
* README.win32: Add MSVC-specific text by Hans Breuer.

View File

@ -1,3 +1,9 @@
2002-03-20 Sven Neumann <sven@gimp.org>
* glib/ghash.c (g_hash_table_resize): avoid repeated call of
g_spaced_primes_closest() by moving it out of the CLAMP macro
(spotted by Salmaso Raffaele).
2002-03-17 Tor Lillqvist <tml@iki.fi>
* README.win32: Add MSVC-specific text by Hans Breuer.

View File

@ -1,3 +1,9 @@
2002-03-20 Sven Neumann <sven@gimp.org>
* glib/ghash.c (g_hash_table_resize): avoid repeated call of
g_spaced_primes_closest() by moving it out of the CLAMP macro
(spotted by Salmaso Raffaele).
2002-03-17 Tor Lillqvist <tml@iki.fi>
* README.win32: Add MSVC-specific text by Hans Breuer.

View File

@ -585,9 +585,9 @@ g_hash_table_resize (GHashTable *hash_table)
gint new_size;
gint i;
new_size = CLAMP(g_spaced_primes_closest (hash_table->nnodes),
HASH_TABLE_MIN_SIZE,
HASH_TABLE_MAX_SIZE);
new_size = g_spaced_primes_closest (hash_table->nnodes);
new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
new_nodes = g_new0 (GHashNode*, new_size);
for (i = 0; i < hash_table->size; i++)