summaryrefslogtreecommitdiff
path: root/cpp/poppler-private.cpp
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2009-12-14 11:06:36 +0100
committerPino Toscano <pino@kde.org>2009-12-14 11:06:36 +0100
commitcfb4f5dfabf31de22d68aa0d5796cb7a33d8b462 (patch)
tree2a38e91c13344718293f789542751edc6ca78a27 /cpp/poppler-private.cpp
parent2d13ac31671b2007e44a90f45a82cb3adfa9c80c (diff)
[cpp] add a byte_array typedef, and use it for utf8 string data
Diffstat (limited to 'cpp/poppler-private.cpp')
-rw-r--r--cpp/poppler-private.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/poppler-private.cpp b/cpp/poppler-private.cpp
index 16ba3703..6ab3b6c4 100644
--- a/cpp/poppler-private.cpp
+++ b/cpp/poppler-private.cpp
@@ -63,8 +63,7 @@ ustring detail::unicode_to_ustring(const Unicode *u, int length)
GooString* detail::ustring_to_unicode_GooString(const ustring &str)
{
- char *u = str.to_utf_8();
- GooString *goo = new GooString(u);
- delete [] u;
+ const byte_array utf8_data = str.to_utf_8();
+ GooString *goo = new GooString(utf8_data.data());
return goo;
}