Commit c639cfe4 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Small optimization. (#348011, Nicolai Weibull)

2006-07-20  Matthias Clasen  <mclasen@redhat.com>

	* glib/guniprop.c (real_toupper, real_tolower): Small optimization.
	(#348011, Nicolai Weibull)
parent 9a0f54fe
2006-07-20 Matthias Clasen <mclasen@redhat.com>
* glib/guniprop.c (real_toupper, real_tolower): Small optimization.
(#348011, Nicolai Weibull)
2006-07-19 Behdad Esfahbod <behdad@gnome.org> 2006-07-19 Behdad Esfahbod <behdad@gnome.org>
* glib/gunibreak.h: * glib/gunibreak.h:
......
2006-07-20 Matthias Clasen <mclasen@redhat.com>
* glib/guniprop.c (real_toupper, real_tolower): Small optimization.
(#348011, Nicolai Weibull)
2006-07-19 Behdad Esfahbod <behdad@gnome.org> 2006-07-19 Behdad Esfahbod <behdad@gnome.org>
* glib/gunibreak.h: * glib/gunibreak.h:
......
...@@ -320,8 +320,8 @@ g_unichar_istitle (gunichar c) ...@@ -320,8 +320,8 @@ g_unichar_istitle (gunichar c)
unsigned int i; unsigned int i;
for (i = 0; i < G_N_ELEMENTS (title_table); ++i) for (i = 0; i < G_N_ELEMENTS (title_table); ++i)
if (title_table[i][0] == c) if (title_table[i][0] == c)
return 1; return TRUE;
return 0; return FALSE;
} }
/** /**
...@@ -823,7 +823,10 @@ real_toupper (const gchar *str, ...@@ -823,7 +823,10 @@ real_toupper (const gchar *str,
for (i = 0; i < G_N_ELEMENTS (title_table); ++i) for (i = 0; i < G_N_ELEMENTS (title_table); ++i)
{ {
if (title_table[i][0] == c) if (title_table[i][0] == c)
val = title_table[i][1]; {
val = title_table[i][1];
break;
}
} }
} }
...@@ -1007,7 +1010,10 @@ real_tolower (const gchar *str, ...@@ -1007,7 +1010,10 @@ real_tolower (const gchar *str,
for (i = 0; i < G_N_ELEMENTS (title_table); ++i) for (i = 0; i < G_N_ELEMENTS (title_table); ++i)
{ {
if (title_table[i][0] == c) if (title_table[i][0] == c)
val = title_table[i][2]; {
val = title_table[i][2];
break;
}
} }
} }
......
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