diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-06 14:29:41 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-06 14:29:41 +0200 |
commit | 0cde479e62ce80a8a619f2e11b77f7f64b970802 (patch) | |
tree | 63f9f88914fb1fb19eaac2a6290571ec0727760d | |
parent | 73a17a5730bfbfb738cf0fa4fe59ad4b478f9731 (diff) |
Revert "Some older versions of boost have a buggy remove_whitespace and original code was not removing either"
This reverts commit 6fe924aae90c7aed8a3ad6e172a90a341f7a82ca.
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/lib/libvisio_utils.cpp | 4 |
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)); |