mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-12 12:14:06 +02:00
string: Add a G_LIKELY
This is the case we optimize for.
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user