为什么这段代码在 Glib 中向后缩进?
Why is this code indented backwards in Glib?
以下代码来自 Glib(glib/gmain.c:3629)。据我所知,Glib 遵循 GNU 风格的缩进。但我不明白为什么 'if (!(source->flags & G_SOURCE_READY))' 行后的 '{' 向后缩进。有人知道为什么吗?
while (g_source_iter_next (&iter, &source))
{
if (SOURCE_DESTROYED (source) || SOURCE_BLOCKED (source))
continue;
if ((n_ready > 0) && (source->priority > max_priority))
break;
if (!(source->flags & G_SOURCE_READY))
{
gboolean result;
gboolean (* check) (GSource *source);
check = source->source_funcs->check;
if (check)
{
可能是制表符与空格。
不要在编辑器中更改 \t
的值; \t
应始终映射到 8 个空格。
以下代码来自 Glib(glib/gmain.c:3629)。据我所知,Glib 遵循 GNU 风格的缩进。但我不明白为什么 'if (!(source->flags & G_SOURCE_READY))' 行后的 '{' 向后缩进。有人知道为什么吗?
while (g_source_iter_next (&iter, &source))
{
if (SOURCE_DESTROYED (source) || SOURCE_BLOCKED (source))
continue;
if ((n_ready > 0) && (source->priority > max_priority))
break;
if (!(source->flags & G_SOURCE_READY))
{
gboolean result;
gboolean (* check) (GSource *source);
check = source->source_funcs->check;
if (check)
{
可能是制表符与空格。
不要在编辑器中更改 \t
的值; \t
应始终映射到 8 个空格。