Commit 4699a338 authored by hjk's avatar hjk
Browse files

Coding style: Allow empty lambda parameter lists to be omitted



Change-Id: I6d4e53c5e16b1f25db62a4996fcc3b0298abd720
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 6696bf13
......@@ -805,16 +805,6 @@
Format the lambda according to the following rules:
\list
\li Always write parentheses for the parameter list, even if the function does not take
parameters.
\code
[]() { doSomething(); }
-NOT
[] { doSomething(); }
\endcode
\li Place the capture-list, parameter list, return type, and opening brace on the first line,
the body indented on the following lines, and the closing brace on a new line.
\code
......@@ -859,9 +849,9 @@
\li Optionally, place the lambda completely on one line if it fits.
\code
foo([]() { return true; });
foo([] { return true; });
if (foo([]() { return true; })) {
if (foo([] { return true; })) {
...
}
\endcode
......
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