Add get_first_non_empty and use it into Database to simplify a little bit

This commit is contained in:
louiz’
2016-08-21 01:51:52 +02:00
parent c97e349821
commit 992fa93895
5 changed files with 49 additions and 6 deletions
+11
View File
@@ -0,0 +1,11 @@
#include <utils/get_first_non_empty.hpp>
bool is_empty(const std::string& val)
{
return val.empty();
}
bool is_empty(const int& val)
{
return val == 0;
}