From 0cde479e62ce80a8a619f2e11b77f7f64b970802 Mon Sep 17 00:00:00 2001 From: Fridrich Štrba Date: Sat, 6 Jul 2013 14:29:41 +0200 Subject: Revert "Some older versions of boost have a buggy remove_whitespace and original code was not removing either" This reverts commit 6fe924aae90c7aed8a3ad6e172a90a341f7a82ca. --- configure.ac | 1 + src/lib/libvisio_utils.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 +#include #include 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 buffer; std::copy(base64_decoder(base64String), base64_decoder(base64String + base64StringLength), std::back_inserter(buffer)); -- cgit v1.2.3