]> git.lyx.org Git - lyx.git/blobdiff - src/support/qstring_helpers.h
Replace the text class shared ptr by good old index-into-global-list.
[lyx.git] / src / support / qstring_helpers.h
index 9028fad7075ef3d7e3d37fde9904cb12f34e8921..39c824fcf378c4dda11e1dd91ab088604fff48c3 100644 (file)
@@ -61,7 +61,7 @@ inline QString const toqstr(docstring const & ucs4)
 {
        // If possible we let qt do the work, since this version does not
        // need to be superfast.
-       return QString::fromUcs4(reinterpret_cast<uint const *>(ucs4.data()), ucs4.length());
+       return QString::fromUcs4((uint const *)ucs4.data(), ucs4.length());
 }
 
 /**
@@ -72,7 +72,8 @@ inline QString const toqstr(docstring const & ucs4)
  */
 inline QString const toqstr(char_type ucs4)
 {
-       return QString::fromUcs4(reinterpret_cast<uint const *>(&ucs4), 1);
+       union { char_type c; uint i; } u = { ucs4 };
+       return QString::fromUcs4(&u.i, 1);
 }
 
 /**