gobject/trivial: reformat parts with clang-format

These pieces will be reworked next. Upfront, reformat them.
No manual changes.
This commit is contained in:
Thomas Haller 2025-04-05 00:24:28 +02:00
parent 0a7eb121fc
commit 34b5c17e8d

View File

@ -3690,9 +3690,9 @@ weak_refs_notify (gpointer data)
* Use #GWeakRef if thread-safety is required. * Use #GWeakRef if thread-safety is required.
*/ */
void void
g_object_weak_ref (GObject *object, g_object_weak_ref (GObject *object,
GWeakNotify notify, GWeakNotify notify,
gpointer data) gpointer data)
{ {
WeakRefStack *wstack; WeakRefStack *wstack;
guint i; guint i;
@ -3730,9 +3730,9 @@ g_object_weak_ref (GObject *object,
* Removes a weak reference callback to an object. * Removes a weak reference callback to an object.
*/ */
void void
g_object_weak_unref (GObject *object, g_object_weak_unref (GObject *object,
GWeakNotify notify, GWeakNotify notify,
gpointer data) gpointer data)
{ {
WeakRefStack *wstack; WeakRefStack *wstack;
gboolean found_one = FALSE; gboolean found_one = FALSE;
@ -3747,16 +3747,16 @@ g_object_weak_unref (GObject *object,
guint i; guint i;
for (i = 0; i < wstack->n_weak_refs; i++) for (i = 0; i < wstack->n_weak_refs; i++)
if (wstack->weak_refs[i].notify == notify && if (wstack->weak_refs[i].notify == notify &&
wstack->weak_refs[i].data == data) wstack->weak_refs[i].data == data)
{ {
found_one = TRUE; found_one = TRUE;
wstack->n_weak_refs -= 1; wstack->n_weak_refs -= 1;
if (i != wstack->n_weak_refs) if (i != wstack->n_weak_refs)
wstack->weak_refs[i] = wstack->weak_refs[wstack->n_weak_refs]; wstack->weak_refs[i] = wstack->weak_refs[wstack->n_weak_refs];
break; break;
} }
} }
object_bit_unlock (object, OPTIONAL_BIT_LOCK_WEAK_REFS); object_bit_unlock (object, OPTIONAL_BIT_LOCK_WEAK_REFS);
if (!found_one) if (!found_one)