From 4699a33837957971c4cf69a63f3f8080539d6a47 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 24 Feb 2015 09:25:59 +0100 Subject: [PATCH] Coding style: Allow empty lambda parameter lists to be omitted Change-Id: I6d4e53c5e16b1f25db62a4996fcc3b0298abd720 Reviewed-by: Daniel Teske Reviewed-by: Eike Ziller --- doc/api/coding-style.qdoc | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/doc/api/coding-style.qdoc b/doc/api/coding-style.qdoc index dbf165e6267..96f1aab7d6c 100644 --- a/doc/api/coding-style.qdoc +++ b/doc/api/coding-style.qdoc @@ -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