From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id C4F5C49993 for ; Thu, 27 Feb 2025 22:47:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5640068DB05; Fri, 28 Feb 2025 00:47:06 +0200 (EET) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C366468D7A3 for ; Fri, 28 Feb 2025 00:46:59 +0200 (EET) Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5ded51d31f1so2623218a12.3 for ; Thu, 27 Feb 2025 14:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740696419; x=1741301219; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lYTWpo4mZL3NzgPSSZGOLcvyd9FfQZNwLZzjD2joDg0=; b=RIbBP63rJEMZ/wESXcQ5EYKhKDDz87Lakce1Vii/jMKkw0TaWReY2eiWkAts9NM9Av yz5QLWa89Pz0A9g8xI5pPLKQdJP8Uu8HKMdLF08S/HtqJQB2q9deSBIsTbyjDq7Vz4bP kaqI6oV0b8ipfbkwuCMkXv3Rl5gftK6s4Suuicw/3eJGPc9VVguovWDdfioxnYiJYe7h fB/4KR7Takdc99kbWJOzhq/0e6PnLUUZUkxlGcCIFSDjbHKQBRzvvZ8OsStD8RwBvRS/ Q+gz0AbIIIH4lVaHBFUa3wVNduAi73/JMTkRltQPMhYFKMNyt5HklH7XuJUq/6OnuJdH 46Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740696419; x=1741301219; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lYTWpo4mZL3NzgPSSZGOLcvyd9FfQZNwLZzjD2joDg0=; b=BmQq3ww1i+Lfsx9qBEQSkCCuhUwkxKyP4STC2zfs8BwPqW2SO6NSU1Gu+wu1r2DpTq H8jV3uzVtPYbiNDIsMiRQMVzILuPSyfSquJTPCq3MrhpJOzCJuz4RL5Q3i7MFLkIjb1U eXMLMttELf0L4KDrajdUhv0/srv9c0ldyT9gYAxmPETB63eUta0lZQifFkYSpfhPTEqK pno7TRvPgl14Z6sRgJaKGk+9LH1yGCxtqIxttDsAfQgsQv6FhLBHYzDbHJQRuA/tVsyN HYpIMEDtpXbQGob7xzAc2vxQabJRtRp0rQ6jiK+fHJi9n0Y83Bnroa3wPuTGJcbve9Lm Yb3g== X-Gm-Message-State: AOJu0Yw8RzbDiNnkjc7nbEezI+OExpWuqKMr+eYQYw16gqVWwT/emq3m g95A4xnJ+Rk6JUTnZjd0u/1NvGGAuK0PQZX07ETB5kHCBOGda+PdRiwx/Q== X-Gm-Gg: ASbGnct1V/CHbrL/uut+rtGY9iTSXDAB6xLlBeatj+Zcd8amKYAC/l58mk3C1Au8xPA W2Pz9C5iz58ScxPaUaRvJxVtdwb89p2Ynlnjk0O8/x87HjIKocS60ZBZ7sLSyDvC2DcgR4SWU7c aYNE0kXDSMfH6fq0ShaxE7pMVIs/5kXDWnURA0zyPN7xkTJohdbSQLpkViBfH7wmNzCpVDQmIP/ AXFeJMuEolAUYsKmGHBBDjAcSlHdr0seGQaPMo2ZfoOeSMSiElPZyxJhaLWtkyjEh82zBGM2bW8 B+g2kwSj+a3BEUalfeT8202xzXBqXaH86IYwLH/MYydmlfvOP9em5murrAOEtBI9H6kgxabjzAs 5YYOpW6zSE6mAmjEfq0Cwm93luxgLQxY7asRK3g== X-Google-Smtp-Source: AGHT+IEArqn1QoKhu867Kht5mCXLMwNAv4aglCXtNbUov9i05dMyjX1cSQbV993U5CNCb6hAeD9ENQ== X-Received: by 2002:a05:6402:50cc:b0:5dc:74f1:8a31 with SMTP id 4fb4d7f45d1cf-5e4d6b4ba0dmr590926a12.26.1740696418846; Thu, 27 Feb 2025 14:46:58 -0800 (PST) Received: from [192.168.178.30] (p200300cccf2325007c1a3f45643ab39a.dip0.t-ipconnect.de. [2003:cc:cf23:2500:7c1a:3f45:643a:b39a]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5e4c3b6ccecsm1688387a12.21.2025.02.27.14.46.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Feb 2025 14:46:57 -0800 (PST) From: epirat07@gmail.com To: FFmpeg development discussions and patches Date: Thu, 27 Feb 2025 23:46:54 +0100 X-Mailer: MailMate (1.14r6065) Message-ID: <6D690464-DE4D-44B1-B851-44C855005FE7@gmail.com> In-Reply-To: <20250227011054.3028508-1-michael@niedermayer.cc> References: <20250227011054.3028508-1-michael@niedermayer.cc> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] doc/developer: Better {} style rule X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 27 Feb 2025, at 2:10, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > doc/developer.texi | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/doc/developer.texi b/doc/developer.texi > index a1bfe180c9b..6a753f99da6 100644 > --- a/doc/developer.texi > +++ b/doc/developer.texi > @@ -179,18 +179,17 @@ int fields = ilace ? 2 : 1; > @end example > > @item > -No braces around single-line blocks: > +No braces around single-line blocks, unless they are followed by an else (to keep future patches cleaner) > I agree with this, however people in the past pointed it out when new code did this, IIRC. So if we merge this, people should stop flagging this in reviews, else its frustrating for new contributors following the documentation and then getting contradicting reviews. > @example c, good > // Good > -if (bits_pixel == 24) > +if (bits_pixel == 24) @{ > avctx->pix_fmt = AV_PIX_FMT_BGR24; > -else if (bits_pixel == 8) > +@} else if (bits_pixel == 8) @{ > avctx->pix_fmt = AV_PIX_FMT_GRAY8; > -else @{ > - av_log(avctx, AV_LOG_ERROR, "Invalid pixel format.\n"); > +@} else > return AVERROR_INVALIDDATA; > -@} > + > @end example > > @item > -- > 2.48.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".