Skip to content

Commit

Permalink
Fix utfcpp 4.x build failure (fixes #193)
Browse files Browse the repository at this point in the history
  • Loading branch information
TinoDidriksen committed Dec 27, 2023
1 parent 05683cc commit 1211c1a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apertium/adapt_docx.cc
Expand Up @@ -257,13 +257,13 @@ size_t findBoundary(string _text, size_t begin)
size_t length = _text.length();
if (begin == 0 || begin >= length)
return begin;
const unsigned char *text = (unsigned char *) _text.c_str();
utf8::iterator<const unsigned char*> textBegin(text, text, text + length);
utf8::iterator<const unsigned char*> textEnd(text + length, text, text + length);
utf8::iterator<const unsigned char*> it(text + begin, text, text + length);
utf8::iterator<const unsigned char*> minBoundary = it;
auto text = _text.c_str();
utf8::iterator<const char*> textBegin(text, text, text + length);
utf8::iterator<const char*> textEnd(text + length, text, text + length);
utf8::iterator<const char*> it(text + begin, text, text + length);
utf8::iterator<const char*> minBoundary = it;
uint32_t cur = *it, cur_1 = 0, cur_2 = 0;
utf8::iterator<const unsigned char*> it2 = it;
utf8::iterator<const char*> it2 = it;
cur_1 = *(--it2);
if (it2 != textBegin)
cur_2 = *(--it2);
Expand Down Expand Up @@ -412,7 +412,7 @@ void process(string fileName, bool outputsName, bool pretty)
xmlDocDumpFormatMemory(document, &buffer, &sizeBuffer, pretty ? 1: 0);
if (outputsName)
cout << "<file name=\"" << fileName << "\"/> ";
const unsigned char *p = buffer;
const xmlChar *p = buffer;
p = printNl2spc(p);
if (pretty)
cout << p;
Expand Down

0 comments on commit 1211c1a

Please sign in to comment.