diff options
author | louiz’ <louiz@louiz.org> | 2017-02-15 01:02:27 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-02-15 01:07:32 +0100 |
commit | 7f08cf83aa5db58bfac004dddae565e6536eeb2c (patch) | |
tree | cc8a62788a6c82abeda802da9285e35cbf6002ce /louloulibs/utils/encoding.cpp | |
parent | fa6635e5487c3efe536c36a27be0ee10b918a346 (diff) | |
download | biboumi-7f08cf83aa5db58bfac004dddae565e6536eeb2c.tar.gz biboumi-7f08cf83aa5db58bfac004dddae565e6536eeb2c.tar.bz2 biboumi-7f08cf83aa5db58bfac004dddae565e6536eeb2c.tar.xz biboumi-7f08cf83aa5db58bfac004dddae565e6536eeb2c.zip |
Little scopeguard cleanup, and add a test
Diffstat (limited to 'louloulibs/utils/encoding.cpp')
-rw-r--r-- | louloulibs/utils/encoding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/louloulibs/utils/encoding.cpp b/louloulibs/utils/encoding.cpp index 087095f..aa91dac 100644 --- a/louloulibs/utils/encoding.cpp +++ b/louloulibs/utils/encoding.cpp @@ -152,7 +152,7 @@ namespace utils throw std::runtime_error("Cannot convert into UTF-8"); // Make sure cd is always closed when we leave this function - const auto sg = utils::make_scope_guard([&cd](auto&&){ iconv_close(cd); }); + const auto sg = utils::make_scope_guard([&cd](){ iconv_close(cd); }); size_t inbytesleft = str.size(); @@ -169,7 +169,7 @@ namespace utils char* outbuf_ptr = outbuf; // Make sure outbuf is always deleted when we leave this function - const auto sg2 = utils::make_scope_guard([outbuf](auto&&){ delete[] outbuf; }); + const auto sg2 = utils::make_scope_guard([outbuf](){ delete[] outbuf; }); bool done = false; while (done == false) |