]> git.lyx.org Git - lyx.git/blobdiff - src/support/unicode.cpp
add generic helper class for calling functions in gui thread
[lyx.git] / src / support / unicode.cpp
index 7f601a86c5e32f684c8a9345fb87ffcb7b20eed4..26c6a239d759d5a355712ccccadb6afa0839092c 100644 (file)
@@ -230,13 +230,13 @@ iconv_convert(IconvProcessor & processor, InType const * buf, size_t buflen)
        if (outbuf.size() < maxoutbufsize)
                outbuf.resize(maxoutbufsize);
 
-       int bytes = processor.convert(inbuf, inbytesleft, outbuf.data(), outbuf.size());
+       int bytes = processor.convert(inbuf, inbytesleft, &outbuf[0], outbuf.size());
        if (bytes <= 0)
                // Conversion failed
                // FIXME Maybe throw an exception and handle that in the caller?
                return vector<RetType>();
 
-       RetType const * tmp = reinterpret_cast<RetType const *>(outbuf.data());
+       RetType const * tmp = reinterpret_cast<RetType const *>(&outbuf[0]);
        return vector<RetType>(tmp, tmp + bytes / sizeof(RetType));
 }