From 454079b90fb8abf2a878381435a6bdde870e7e0f Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Sun, 18 Aug 2013 21:37:55 -0700 Subject: [PATCH 1/2] Whitespace conventions for all unary/binary operators --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae1f740..c4e6591 100644 --- a/README.md +++ b/README.md @@ -94,10 +94,15 @@ Blah *a = (stuff == thing ? foo : bar); Blah *b = thingThatCouldBeNil ?: defaultValue; ``` - * There shouldn't be a space between a cast and the variable being cast. + * Separate binary operands with a single space, and unary operands with none: -``` objc +```c +void *ptr = &value + 10 * 3; NewType a = (NewType)b; + +for (int i = 0; i < 10; i++) { + doCoolThings(); +} ``` ## Control Structures From e7b8628ff8d9bb56744ed73afbc21387cb97dbfb Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 19 Aug 2013 02:03:00 -0700 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4e6591..01a0961 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Blah *a = (stuff == thing ? foo : bar); Blah *b = thingThatCouldBeNil ?: defaultValue; ``` - * Separate binary operands with a single space, and unary operands with none: + * Separate binary operands with a single space, but unary operands and casts with none: ```c void *ptr = &value + 10 * 3;