mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 11:56:16 +01:00
string: Add a G_LIKELY
This is the case we optimize for.
This commit is contained in:
parent
34b7992fd6
commit
0cc74d5a37
@ -168,7 +168,7 @@ static inline GString*
|
|||||||
g_string_append_c_inline (GString *gstring,
|
g_string_append_c_inline (GString *gstring,
|
||||||
gchar c)
|
gchar c)
|
||||||
{
|
{
|
||||||
if (gstring->len + 1 < gstring->allocated_len)
|
if (G_LIKELY (gstring->len + 1 < gstring->allocated_len))
|
||||||
{
|
{
|
||||||
gstring->str[gstring->len++] = c;
|
gstring->str[gstring->len++] = c;
|
||||||
gstring->str[gstring->len] = 0;
|
gstring->str[gstring->len] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user