summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-06 14:29:41 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-06 14:29:41 +0200
commit0cde479e62ce80a8a619f2e11b77f7f64b970802 (patch)
tree63f9f88914fb1fb19eaac2a6290571ec0727760d
parent73a17a5730bfbfb738cf0fa4fe59ad4b478f9731 (diff)
Revert "Some older versions of boost have a buggy remove_whitespace and original code was not removing either"
-rw-r--r--configure.ac1
-rw-r--r--src/lib/libvisio_utils.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c560c1d..dd12566 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,6 +112,7 @@ AC_CHECK_HEADERS(
boost/optional.hpp \
boost/spirit/include/classic.hpp \
boost/archive/iterators/binary_from_base64.hpp \
+ boost/archive/iterators/remove_whitespace.hpp \
boost/archive/iterators/transform_width.hpp,
[],
[AC_MSG_ERROR(Required boost headers not found. install boost >= 1.36)],
diff --git a/src/lib/libvisio_utils.cpp b/src/lib/libvisio_utils.cpp
index 8978385..42e2adc 100644
--- a/src/lib/libvisio_utils.cpp
+++ b/src/lib/libvisio_utils.cpp
@@ -33,6 +33,7 @@
#include "libvisio_utils.h"
#include <boost/archive/iterators/binary_from_base64.hpp>
+#include <boost/archive/iterators/remove_whitespace.hpp>
#include <boost/archive/iterators/transform_width.hpp>
uint8_t libvisio::readU8(WPXInputStream *input)
@@ -125,7 +126,8 @@ double libvisio::readDouble(WPXInputStream *input)
void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char *base64String, size_t base64StringLength)
{
typedef boost::archive::iterators::transform_width<
- boost::archive::iterators::binary_from_base64< const char * >, 8, 6 > base64_decoder;
+ boost::archive::iterators::binary_from_base64<
+ boost::archive::iterators::remove_whitespace< const char * > >, 8, 6 > base64_decoder;
std::vector<unsigned char> buffer;
std::copy(base64_decoder(base64String), base64_decoder(base64String + base64StringLength), std::back_inserter(buffer));