Title: [231085] trunk/Websites/webkit.org
- Revision
- 231085
- Author
- ross.kirsl...@sony.com
- Date
- 2018-04-26 21:00:01 -0700 (Thu, 26 Apr 2018)
Log Message
Update code style guidelines to mention braced initialization style.
https://bugs.webkit.org/show_bug.cgi?id=185053
Reviewed by Ryosuke Niwa.
* code-style.md:
Add a clause to the Spacing section about braced initialization.
(Also, fix an erroneous element ID on a neighboring line.)
Modified Paths
Diff
Modified: trunk/Websites/webkit.org/ChangeLog (231084 => 231085)
--- trunk/Websites/webkit.org/ChangeLog 2018-04-27 02:00:25 UTC (rev 231084)
+++ trunk/Websites/webkit.org/ChangeLog 2018-04-27 04:00:01 UTC (rev 231085)
@@ -1,3 +1,14 @@
+2018-04-26 Ross Kirsling <ross.kirsl...@sony.com>
+
+ Update code style guidelines to mention braced initialization style.
+ https://bugs.webkit.org/show_bug.cgi?id=185053
+
+ Reviewed by Ryosuke Niwa.
+
+ * code-style.md:
+ Add a clause to the Spacing section about braced initialization.
+ (Also, fix an erroneous element ID on a neighboring line.)
+
2018-04-04 Andy Estes <aes...@apple.com>
Unreviewed. Correct the path to merchant-validation-config.php.
Modified: trunk/Websites/webkit.org/code-style.md (231084 => 231085)
--- trunk/Websites/webkit.org/code-style.md 2018-04-27 02:00:25 UTC (rev 231084)
+++ trunk/Websites/webkit.org/code-style.md 2018-04-27 04:00:01 UTC (rev 231085)
@@ -234,11 +234,26 @@
f( a, b );
```
-[](#spacing-function-paren) In Objective-C, do not place spaces between the start of a block and its arguments, or the start of a block and its opening brace. **Do** place a space between argument lists and the opening brace of the block.
+[](#spacing-braced-init) When initializing an object, place a space before the leading brace as well as between the braces and their content.
###### Right:
```cpp
+Foo foo { bar };
+```
+
+###### Wrong:
+
+```cpp
+Foo foo{ bar };
+Foo foo {bar};
+```
+
+[](#spacing-objc-block) In Objective-C, do not place spaces between the start of a block and its arguments, or the start of a block and its opening brace. **Do** place a space between argument lists and the opening brace of the block.
+
+###### Right:
+
+```cpp
block = ^{
...
};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes