summaryrefslogtreecommitdiff
path: root/src/utils/get_first_non_empty.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2020-05-04 23:55:39 +0200
committerlouiz’ <louiz@louiz.org>2020-05-09 14:40:56 +0200
commitf76cd93aff1610c9b4c720a73f6d585e8008dfd1 (patch)
treeeef71f4e81e72bda3068687185de5e427a1bd8a1 /src/utils/get_first_non_empty.hpp
parentc671da13b38dcc15d0a441b1b9c258cb12966fca (diff)
downloadbiboumi-f76cd93aff1610c9b4c720a73f6d585e8008dfd1.tar.gz
biboumi-f76cd93aff1610c9b4c720a73f6d585e8008dfd1.tar.bz2
biboumi-f76cd93aff1610c9b4c720a73f6d585e8008dfd1.tar.xz
biboumi-f76cd93aff1610c9b4c720a73f6d585e8008dfd1.zip
Fix clang warnings on some utils function. It’s also faster
Diffstat (limited to 'src/utils/get_first_non_empty.hpp')
-rw-r--r--src/utils/get_first_non_empty.hpp4
1 files changed, 2 insertions, 2 deletions
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 <typename T>
-T get_first_non_empty(T&& last)
+T& get_first_non_empty(T&& last)
{
return last;
}
template <typename T, typename... Args>
-T get_first_non_empty(T&& first, Args&&... args)
+T& get_first_non_empty(T&& first, Args&&... args)
{
if (!is_empty(first))
return first;