summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2021-12-05 20:59:51 +0100
committerRoland Reichwein <mail@reichwein.it>2021-12-05 20:59:51 +0100
commitf61b0aeafd2f5f2619ff21efb000026364c79230 (patch)
treeebfc2ec2f2833164484eafa4166efc524467bd17
parent40526eb7f247fdfc9d08c39ed3eaa97844b3c448 (diff)
Version 1.6v1.6
-rw-r--r--debian/changelog7
-rw-r--r--src/recode.cpp4
2 files changed, 9 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index b6d362d..ba3c9b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+unicode (1.6) unstable; urgency=medium
+
+ * Fixed recode
+ * boost is still broken in v1.77
+
+ -- Roland Reichwein <mail@reichwein.it> Sun, 05 Dec 2021 20:59:45 +0100
+
unicode (1.5) unstable; urgency=medium
* Fixed C++20 version and tests
diff --git a/src/recode.cpp b/src/recode.cpp
index 89bd69b..beb133f 100644
--- a/src/recode.cpp
+++ b/src/recode.cpp
@@ -75,7 +75,7 @@ template<typename T>
void reverse_endian(std::basic_string<T>& s)
{
std::for_each(s.begin(), s.end(), [](T& c){
-#if BOOST_VERSION > 107400
+#if BOOST_VERSION > 107700
boost::endian::endian_reverse_inplace(c);
#else
reverse_endian_inplace(c);
@@ -95,7 +95,7 @@ void register_convert()
if (s.size() % sizeof(typename From::value_type) != 0)
throw std::invalid_argument("Bad number of input bytes. Need multiple of "s + std::to_string(sizeof(typename From::value_type)) + ", got " + std::to_string(s.size()));
- std::basic_string<typename From::value_type> from_data(s.size(), static_cast<typename From::value_type>(0));
+ std::basic_string<typename From::value_type> from_data(s.size() / sizeof(typename From::value_type), static_cast<typename From::value_type>(0));
std::memcpy(from_data.data(), s.data(), s.size());