From f99ea9ab3aeeee56a34fe68d763148a1dd83cdf6 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 2 Nov 2017 16:57:32 +0100 Subject: [PATCH] Sonar: make return type of lambdas implicit. --- include/xbt/functional.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xbt/functional.hpp b/include/xbt/functional.hpp index 6f093af633..64c3caac9d 100644 --- a/include/xbt/functional.hpp +++ b/include/xbt/functional.hpp @@ -208,11 +208,11 @@ private: { const static TaskVtable vtable { // Call: - [](TaskUnion& buffer, Args... args) -> R { + [](TaskUnion& buffer, Args... args) { F* src = reinterpret_cast(&buffer); F code = std::move(*src); src->~F(); - code(std::forward(args)...); + return code(std::forward(args)...); }, // Destroy: std::is_trivially_destructible::value ? @@ -237,7 +237,7 @@ private: { const static TaskVtable vtable { // Call: - [](TaskUnion& buffer, Args... args) -> R { + [](TaskUnion& buffer, Args... args) { // Delete F when we go out of scope: std::unique_ptr code(*reinterpret_cast(&buffer)); return (*code)(std::forward(args)...); -- 2.20.1