diff options
author | louiz’ <louiz@louiz.org> | 2019-11-06 17:47:35 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2019-11-06 17:47:35 +0100 |
commit | 7571020243889db72bb0182dbacc84e506afa279 (patch) | |
tree | b40983a03b85bca2dcb9325fb6eba0d6d2914476 /src/utils/get_first_non_empty.cpp | |
parent | 4484a5f8ce207a29c07550b8b071a115c8d4ad59 (diff) | |
download | biboumi-7571020243889db72bb0182dbacc84e506afa279.tar.gz biboumi-7571020243889db72bb0182dbacc84e506afa279.tar.bz2 biboumi-7571020243889db72bb0182dbacc84e506afa279.tar.xz biboumi-7571020243889db72bb0182dbacc84e506afa279.zip |
Make is_empty work with any integral type
Diffstat (limited to 'src/utils/get_first_non_empty.cpp')
-rw-r--r-- | src/utils/get_first_non_empty.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/utils/get_first_non_empty.cpp b/src/utils/get_first_non_empty.cpp index 5b3bedb..17585b1 100644 --- a/src/utils/get_first_non_empty.cpp +++ b/src/utils/get_first_non_empty.cpp @@ -1,11 +1,8 @@ #include <utils/get_first_non_empty.hpp> +template <> bool is_empty(const std::string& val) { return val.empty(); } -bool is_empty(const int& val) -{ - return val == 0; -} |