From f76cd93aff1610c9b4c720a73f6d585e8008dfd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 4 May 2020 23:55:39 +0200 Subject: =?UTF-8?q?Fix=20clang=20warnings=20on=20some=20utils=20function.?= =?UTF-8?q?=20It=E2=80=99s=20also=20faster?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/get_first_non_empty.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils/get_first_non_empty.hpp') diff --git a/src/utils/get_first_non_empty.hpp b/src/utils/get_first_non_empty.hpp index a38f5fb..2e1828d 100644 --- a/src/utils/get_first_non_empty.hpp +++ b/src/utils/get_first_non_empty.hpp @@ -6,13 +6,13 @@ bool is_empty(const std::string& val); bool is_empty(const int& val); template -T get_first_non_empty(T&& last) +T& get_first_non_empty(T&& last) { return last; } template -T get_first_non_empty(T&& first, Args&&... args) +T& get_first_non_empty(T&& first, Args&&... args) { if (!is_empty(first)) return first; -- cgit v1.2.3