From c4b7431a443ccf1385befc3842784186d9b9b52b Mon Sep 17 00:00:00 2001 From: "smparkes@smparkes.net" Date: Tue, 6 Mar 2012 16:41:08 +0000 Subject: [PATCH] NO_ICONV support in aztec decoder git-svn-id: https://zxing.googlecode.com/svn/trunk@2220 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- cpp/core/src/zxing/aztec/decoder/Decoder.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpp/core/src/zxing/aztec/decoder/Decoder.cpp b/cpp/core/src/zxing/aztec/decoder/Decoder.cpp index 2f2b3aba9..ec30cf43d 100644 --- a/cpp/core/src/zxing/aztec/decoder/Decoder.cpp +++ b/cpp/core/src/zxing/aztec/decoder/Decoder.cpp @@ -20,7 +20,9 @@ */ #include +#ifndef NO_ICONV #include +#endif #include #include #include @@ -39,6 +41,7 @@ using std::string; namespace { void add(string& result, unsigned char character) { +#ifndef NO_ICONV char s[] = { character & 0xff }; char* ss = s; size_t sl = sizeof(s); @@ -50,6 +53,9 @@ namespace { iconv_close(ic); d[sizeof(d)-dl] = 0; result.append(d); +#else + result.push_back(character); +#endif } const int NB_BITS_COMPACT[] = {