Commit 9db2e8fd authored by weinig@apple.com's avatar weinig@apple.com

Fix for https://bugs.webkit.org/show_bug.cgi?id=30196

Change style guidelines for indentation in header files

Reviewed by Dan Bernstein.

* coding/coding-style.html: Don't indent in a namespace in a header file.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e78eaab6
2009-10-07 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
Fix for https://bugs.webkit.org/show_bug.cgi?id=30196
Change style guidelines for indentation in header files
* coding/coding-style.html: Don't indent in a namespace in a header file.
2009-10-07 Steve Falkenburg <sfalken@apple.com>
Reviewed by Mark Rowe.
......
......@@ -41,23 +41,10 @@ int main()
}
</pre>
</li>
<li>In a header, code inside a namespace should be indented.
<li>Code inside a namespace should not be indented.
<h4 class="right">Right:</h4>
<pre class="code">
// Document.h
namespace WebCore {
class Document {
Document();
...
};
} // namespace WebCore
</pre>
<h4 class="wrong">Wrong:</h4>
<pre class="code">
// Document.h
namespace WebCore {
class Document {
......@@ -66,12 +53,7 @@ class Document {
};
} // namespace WebCore
</pre>
</li>
<li>In an implementation file (files with the extension .cpp, .c or .mm), code inside a namespace should <em>not</em> be indented.
<h4 class="right">Right:</h4>
<pre class="code">
// Document.cpp
namespace WebCore {
......@@ -85,6 +67,16 @@ Document::Document()
<h4 class="wrong">Wrong:</h4>
<pre class="code">
// Document.h
namespace WebCore {
class Document {
Document();
...
};
} // namespace WebCore
// Document.cpp
namespace WebCore {
......@@ -96,6 +88,7 @@ namespace WebCore {
} // namespace WebCore
</pre>
</li>
<li>A case label should line up with its switch statement. The case statement is indented.
<h4 class="right">Right:</h4>
<pre class="code">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment