summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2013-11-29 16:20:50 +0100
committerJay Berkenbilt <ejb@ql.org>2013-11-29 16:48:16 +0100
commitdc9df97466b3980ba025ee4ff8aa7012ece1a848 (patch)
treee2439bc4189aa19ab315db9544f95e52d4a50c55
parent157c936b970a19f58a279b9cbea81a36fcbb1b7e (diff)
downloadqpdf-dc9df97466b3980ba025ee4ff8aa7012ece1a848.tar.zst
Include <algorithm> for std::min, std::max
-rw-r--r--ChangeLog5
-rw-r--r--libqpdf/BufferInputSource.cc1
-rw-r--r--libqpdf/FileInputSource.cc1
-rw-r--r--libqpdf/QPDF.cc1
-rw-r--r--libqpdf/QPDFWriter.cc1
-rw-r--r--libqpdf/QPDF_encryption.cc1
-rw-r--r--qpdf/test_driver.cc1
7 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cd185d0b..419d573e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-29 Jay Berkenbilt <ejb@ql.org>
+
+ * Add missing #include <algorithm> in some files that use std::min
+ and std::max.
+
2013-11-21 Jay Berkenbilt <ejb@ql.org>
* Change image comparison tests, which are disabled by default, to
diff --git a/libqpdf/BufferInputSource.cc b/libqpdf/BufferInputSource.cc
index 73baefae..4346fcd0 100644
--- a/libqpdf/BufferInputSource.cc
+++ b/libqpdf/BufferInputSource.cc
@@ -1,6 +1,7 @@
#include <qpdf/BufferInputSource.hh>
#include <string.h>
#include <stdexcept>
+#include <algorithm>
BufferInputSource::BufferInputSource(std::string const& description,
Buffer* buf, bool own_memory) :
diff --git a/libqpdf/FileInputSource.cc b/libqpdf/FileInputSource.cc
index ef259c4c..a1b1ced5 100644
--- a/libqpdf/FileInputSource.cc
+++ b/libqpdf/FileInputSource.cc
@@ -2,6 +2,7 @@
#include <string.h>
#include <qpdf/QUtil.hh>
#include <qpdf/QPDFExc.hh>
+#include <algorithm>
FileInputSource::FileInputSource() :
close_file(false),
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index cae7a7c2..e3c3d83e 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -3,6 +3,7 @@
#include <vector>
#include <map>
+#include <algorithm>
#include <string.h>
#include <memory.h>
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc
index 4e917469..d37b8d4a 100644
--- a/libqpdf/QPDFWriter.cc
+++ b/libqpdf/QPDFWriter.cc
@@ -19,6 +19,7 @@
#include <qpdf/QPDF_Name.hh>
#include <qpdf/QPDF_String.hh>
+#include <algorithm>
#include <stdlib.h>
QPDFWriter::QPDFWriter(QPDF& pdf) :
diff --git a/libqpdf/QPDF_encryption.cc b/libqpdf/QPDF_encryption.cc
index b6a035ef..23284809 100644
--- a/libqpdf/QPDF_encryption.cc
+++ b/libqpdf/QPDF_encryption.cc
@@ -14,6 +14,7 @@
#include <qpdf/RC4.hh>
#include <qpdf/MD5.hh>
+#include <algorithm>
#include <assert.h>
#include <string.h>
diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc
index 49dfbc64..a40df34e 100644
--- a/qpdf/test_driver.cc
+++ b/qpdf/test_driver.cc
@@ -11,6 +11,7 @@
#include <qpdf/QPDFWriter.hh>
#include <iostream>
#include <sstream>
+#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>