Mercurial > code
diff cpp/join/join.hpp @ 648:5bd9424a523a
misc: extreme cleanup
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 04 Oct 2018 21:17:55 +0200 |
parents | 89c1d2bd33eb |
children | 87e1f4c7da76 |
line wrap: on
line diff
--- a/cpp/join/join.hpp Wed Aug 01 14:08:40 2018 +0200 +++ b/cpp/join/join.hpp Thu Oct 04 21:17:55 2018 +0200 @@ -36,16 +36,16 @@ template <typename InputIt, typename DelimType = char> auto join(InputIt first, InputIt last, DelimType delim = ':') -> std::string { - std::ostringstream oss; + std::ostringstream oss; - if (first != last) { - oss << *first; + if (first != last) { + oss << *first; - while (++first != last) - oss << delim << *first; - } + while (++first != last) + oss << delim << *first; + } - return oss.str(); + return oss.str(); } /** @@ -58,5 +58,5 @@ template <typename T, typename DelimType = char> auto join(std::initializer_list<T> list, DelimType delim = ':') -> std::string { - return join(list.begin(), list.end(), delim); + return join(list.begin(), list.end(), delim); }