[poppler] 3 commits - cpp/poppler-document.cpp cpp/poppler-global.cpp cpp/tests poppler/Hints.cc

Pino Toscano pino at kemper.freedesktop.org
Sat Nov 20 04:15:12 PST 2010


 cpp/poppler-document.cpp   |    1 +
 cpp/poppler-global.cpp     |    1 +
 cpp/tests/poppler-dump.cpp |    1 +
 poppler/Hints.cc           |    6 +++---
 4 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 91aa4b02aa93ffe3828479194067de42d52be465
Author: Pino Toscano <pino at kde.org>
Date:   Sat Nov 20 13:13:46 2010 +0100

    [cpp] include <ios> for std::hex() and std::left()

diff --git a/cpp/poppler-global.cpp b/cpp/poppler-global.cpp
index 3af7328..f99dbb7 100644
--- a/cpp/poppler-global.cpp
+++ b/cpp/poppler-global.cpp
@@ -23,6 +23,7 @@
 
 #include <cerrno>
 #include <cstring>
+#include <ios>
 #include <iostream>
 
 #include <iconv.h>
diff --git a/cpp/tests/poppler-dump.cpp b/cpp/tests/poppler-dump.cpp
index f087e3b..d335ff0 100644
--- a/cpp/tests/poppler-dump.cpp
+++ b/cpp/tests/poppler-dump.cpp
@@ -26,6 +26,7 @@
 #include <cstring>
 #include <ctime>
 #include <iomanip>
+#include <ios>
 #include <iostream>
 #include <memory>
 #include <sstream>
commit 1c924412923cb01f2cb95b0943cb7bbaf7e8cfb6
Author: Pino Toscano <pino at kde.org>
Date:   Sat Nov 20 13:02:36 2010 +0100

    [cpp] include <iterator> for std::back_inserter()

diff --git a/cpp/poppler-document.cpp b/cpp/poppler-document.cpp
index 19f8d1f..3495a4b 100644
--- a/cpp/poppler-document.cpp
+++ b/cpp/poppler-document.cpp
@@ -32,6 +32,7 @@
 #include "Outline.h"
 
 #include <algorithm>
+#include <iterator>
 #include <memory>
 
 using namespace poppler;
commit 95b551025a34f3a7bcff2852eac6d186bc8a7cb0
Author: Pino Toscano <pino at kde.org>
Date:   Sat Nov 20 12:54:21 2010 +0100

    use a std::vector<char> instead of a var-length-array of char's

diff --git a/poppler/Hints.cc b/poppler/Hints.cc
index c9cb151..2933378 100644
--- a/poppler/Hints.cc
+++ b/poppler/Hints.cc
@@ -105,8 +105,8 @@ void Hints::readTables(BaseStream *str, Linearization *linearization, XRef *xref
 
   int bufLength = hintsLength + hintsLength2;
 
-  char buf[bufLength];
-  char *p = buf;
+  std::vector<char> buf(bufLength);
+  char *p = &buf[0];
 
   obj.initNull();
   Stream *s = str->makeSubStream(hintsOffset, gFalse, hintsLength, &obj);
@@ -123,7 +123,7 @@ void Hints::readTables(BaseStream *str, Linearization *linearization, XRef *xref
   }
 
   obj.initNull();
-  MemStream *memStream = new MemStream (buf, 0, bufLength, &obj);
+  MemStream *memStream = new MemStream (&buf[0], 0, bufLength, &obj);
 
   obj.initNull();
   parser = new Parser(xref, new Lexer(xref, memStream), gTrue);


More information about the poppler mailing list