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 5A8544D994 for ; Thu, 27 Feb 2025 01:11:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 623A668CF8A; Thu, 27 Feb 2025 03:11:01 +0200 (EET) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6EFAC68C1D1 for ; Thu, 27 Feb 2025 03:10:55 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id C901F442C7 for ; Thu, 27 Feb 2025 01:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1740618654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=KmFvSm1ZU4Uvj6QV68EVbFMNxmuizE/dvfKp2BEQtpY=; b=KhRsOZtbwhXFlDhzjXUQFjHCrNZhe6GYlVeeX6a7IKLk/CG8uk4qNMTN9Xq6VZU/yxwSUV V1Nh7Tnx6Hv5xOgjiT+ajLMnQi5MxaiSvjYKO6kTraxG4OACqw1h6BG6aeFrY+lvk6qM3m Ct/0pHVdTgCVawNQuc22W8NotLSOczFWKJ+ei9DI9zb2U4HfviQp0mrx978KPT0vGTw401 5lGNHMrNGpDnZrdMUWL/VLrvQHLcc2aQhuOZ8wpWaafCPvI+HESn1GyfAtGBNZNsqytqFo XPYU46oAzK6y5cAKlGW8xEHZihu8Ve+iZQ0UIB+Ksu5/qt4G8+sZFyp2xEzPpA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 27 Feb 2025 02:10:53 +0100 Message-ID: <20250227011054.3028508-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdekieduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhephfelvddvhefgtedtfeeuvedtieffhfekleejteejuefglefgffeiudehveevgfdvnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [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: 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) @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".