mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
gdk/gdkarrayimpl.c: Fix build on Visual Studio
It seems like initializing something to an empty array using `{}` is a GCCism, so just stuff a 0 within the braces to accomplish the same thing.
This commit is contained in:
parent
7e2fceebca
commit
89f7d841ab
@ -73,7 +73,7 @@ gdk_array(init) (GdkArray *self)
|
||||
self->end = self->start;
|
||||
self->end_allocation = self->start + GDK_ARRAY_PREALLOC;
|
||||
#ifdef GDK_ARRAY_NULL_TERMINATED
|
||||
*self->start = *(_T_[1]) {};
|
||||
*self->start = *(_T_[1]) { 0 };
|
||||
#endif
|
||||
#else
|
||||
self->start = NULL;
|
||||
@ -165,7 +165,7 @@ gdk_array(reserve) (GdkArray *self,
|
||||
if (self->start == NULL)
|
||||
{
|
||||
self->start = g_new (_T_, new_size);
|
||||
*self->start = *(_T_[1]) {};
|
||||
*self->start = *(_T_[1]) { 0 };
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user