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-04 23:55:39 +0200
commit10d683354b739ae2567c7898ae11479413dc475a (patch)
tree3f87fbc934af457926b2861d5f975c1ad1674529 /src/utils/get_first_non_empty.hpp
parentc91fac82da5d3cae0f363eb6b75017808837125b (diff)
downloadbiboumi-10d683354b739ae2567c7898ae11479413dc475a.tar.gz
biboumi-10d683354b739ae2567c7898ae11479413dc475a.tar.bz2
biboumi-10d683354b739ae2567c7898ae11479413dc475a.tar.xz
biboumi-10d683354b739ae2567c7898ae11479413dc475a.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 1877ee8..6129b63 100644
--- a/src/utils/get_first_non_empty.hpp
+++ b/src/utils/get_first_non_empty.hpp
@@ -11,13 +11,13 @@ template <>
bool is_empty(const std::string& 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;