[Piglit] [PATCH 5/9] glean: Add missing <algorithm> includes.
jfonseca at vmware.com
jfonseca at vmware.com
Tue Apr 29 10:57:50 PDT 2014
From: José Fonseca <jfonseca at vmware.com>
max/min were being used in several places, without including
algorithm header, and on MSVC 2013 the header is not being included
internally.
---
tests/glean/tbinding.cpp | 2 +-
tests/glean/tblend.cpp | 1 +
tests/glean/tlogicop.cpp | 1 +
tests/glean/tpgos.cpp | 1 +
tests/glean/treadpix.cpp | 1 +
5 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/glean/tbinding.cpp b/tests/glean/tbinding.cpp
index e2b4e44..48c7668 100644
--- a/tests/glean/tbinding.cpp
+++ b/tests/glean/tbinding.cpp
@@ -32,6 +32,7 @@
#include "image.h"
#include "rand.h"
#include <cmath>
+#include <algorithm> // max
#if 0
#ifdef __UNIX__
@@ -40,7 +41,6 @@
#include <iostream>
#include <fstream>
-#include <algorithm>
#include <cmath>
#include "dsconfig.h"
#include "dsfilt.h"
diff --git a/tests/glean/tblend.cpp b/tests/glean/tblend.cpp
index e96c2ab..ba3ba8b 100644
--- a/tests/glean/tblend.cpp
+++ b/tests/glean/tblend.cpp
@@ -35,6 +35,7 @@
#include "image.h"
#include <cmath>
#include <cstdlib>
+#include <algorithm> // min, max
#define ELEMENTS(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY[0]))
diff --git a/tests/glean/tlogicop.cpp b/tests/glean/tlogicop.cpp
index 66a2045..2249052 100644
--- a/tests/glean/tlogicop.cpp
+++ b/tests/glean/tlogicop.cpp
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include <cmath>
+#include <algorithm> // max
#include "tlogicop.h"
#include "rand.h"
#include "image.h"
diff --git a/tests/glean/tpgos.cpp b/tests/glean/tpgos.cpp
index 029550d..71d794b 100644
--- a/tests/glean/tpgos.cpp
+++ b/tests/glean/tpgos.cpp
@@ -35,6 +35,7 @@
#include "image.h"
#include "misc.h"
#include <cmath>
+#include <algorithm>
namespace {
diff --git a/tests/glean/treadpix.cpp b/tests/glean/treadpix.cpp
index 6326725..490f2f5 100644
--- a/tests/glean/treadpix.cpp
+++ b/tests/glean/treadpix.cpp
@@ -34,6 +34,7 @@
#endif
#include <iomanip>
#include <cstdlib>
+#include <algorithm>
#include "misc.h"
#include "rand.h"
#include "treadpix.h"
--
1.9.1
More information about the Piglit
mailing list