[poppler] Branch 'cpp-frontend' - cpp/poppler-global.cpp cpp/poppler-private.cpp

Pino Toscano pino at kemper.freedesktop.org
Mon Dec 14 15:55:55 PST 2009


 cpp/poppler-global.cpp  |    2 +-
 cpp/poppler-private.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ca1d2ec4588b2437b58b4448ae2fc5ebd0f130d3
Author: Pino Toscano <pino at kde.org>
Date:   Tue Dec 15 00:54:29 2009 +0100

    [cpp] fix the reference to the vector data

diff --git a/cpp/poppler-global.cpp b/cpp/poppler-global.cpp
index cc52b55..424f947 100644
--- a/cpp/poppler-global.cpp
+++ b/cpp/poppler-global.cpp
@@ -161,7 +161,7 @@ std::ostream& poppler::operator<<(std::ostream& stream, const byte_array &array)
     stream << "[";
     const std::ios_base::fmtflags f = stream.flags();
     std::hex(stream);
-    const char *data = array.data();
+    const char *data = &array[0];
     const byte_array::size_type out_len = std::min<byte_array::size_type>(array.size(), 50);
     for (byte_array::size_type i = 0; i < out_len; ++i)
     {
diff --git a/cpp/poppler-private.cpp b/cpp/poppler-private.cpp
index 6ab3b6c..1ba3433 100644
--- a/cpp/poppler-private.cpp
+++ b/cpp/poppler-private.cpp
@@ -64,6 +64,6 @@ ustring detail::unicode_to_ustring(const Unicode *u, int length)
 GooString* detail::ustring_to_unicode_GooString(const ustring &str)
 {
     const byte_array utf8_data = str.to_utf_8();
-    GooString *goo = new GooString(utf8_data.data());
+    GooString *goo = new GooString(&utf8_data[0]);
     return goo;
 }


More information about the poppler mailing list