NO_ICONV support in aztec decoder

git-svn-id: https://zxing.googlecode.com/svn/trunk@2220 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
smparkes@smparkes.net 2012-03-06 16:41:08 +00:00
parent b10e1c6b0e
commit c4b7431a44

View file

@ -20,7 +20,9 @@
*/
#include <zxing/aztec/decoder/Decoder.h>
#ifndef NO_ICONV
#include <iconv.h>
#endif
#include <iostream>
#include <zxing/FormatException.h>
#include <zxing/common/reedsolomon/ReedSolomonDecoder.h>
@ -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[] = {