From: Arnaud Giersch Date: Thu, 2 Nov 2017 15:57:32 +0000 (+0100) Subject: Sonar: make return type of lambdas implicit. X-Git-Tag: v3.18~314 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f99ea9ab3aeeee56a34fe68d763148a1dd83cdf6 Sonar: make return type of lambdas implicit. --- 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)...);