Fix clang warnings on some utils function. It’s also faster

This commit is contained in:
louiz’
2020-05-09 14:40:56 +02:00
parent c671da13b3
commit f76cd93aff
2 changed files with 5 additions and 11 deletions
+2 -2
View File
@@ -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;