aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--fuzz/Fuzz.h1
-rw-r--r--include/core/SkTypes.h2
-rw-r--r--include/private/SkPathRef.h1
-rw-r--r--src/core/SkNx.h4
-rw-r--r--src/core/SkSafeMath.h1
-rw-r--r--src/opts/SkNx_neon.h4
6 files changed, 9 insertions, 4 deletions
diff --git a/fuzz/Fuzz.h b/fuzz/Fuzz.h
index 4fb7396ecc..3ffe47db2d 100644
--- a/fuzz/Fuzz.h
+++ b/fuzz/Fuzz.h
@@ -15,6 +15,7 @@
#include <cmath>
#include <signal.h>
+#include <limits>
class Fuzz : SkNoncopyable {
public:
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 06e101efbf..7945e12426 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -248,6 +248,8 @@ typedef uint32_t SkMSec;
*/
#ifdef __cplusplus
+#include <utility>
+
/** Generic swap function. Classes with efficient swaps should specialize this function to take
their fast path. This function is used by SkTSort. */
template <typename T> static inline void SkTSwap(T& a, T& b) {
diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h
index 9ce1aeef2c..d9c8849334 100644
--- a/include/private/SkPathRef.h
+++ b/include/private/SkPathRef.h
@@ -17,6 +17,7 @@
#include "SkRect.h"
#include "SkRefCnt.h"
#include "SkTemplates.h"
+#include <limits>
class SkRBuffer;
class SkWBuffer;
diff --git a/src/core/SkNx.h b/src/core/SkNx.h
index 11c8f7c665..953654063a 100644
--- a/src/core/SkNx.h
+++ b/src/core/SkNx.h
@@ -103,8 +103,8 @@ struct SkNx {
Half::Store2(ptr + 2*N/2*sizeof(T), a.fHi, b.fHi);
}
- AI T min() const { return std::min(fLo.min(), fHi.min()); }
- AI T max() const { return std::max(fLo.max(), fHi.max()); }
+ AI T min() const { return SkTMin(fLo.min(), fHi.min()); }
+ AI T max() const { return SkTMax(fLo.max(), fHi.max()); }
AI bool anyTrue() const { return fLo.anyTrue() || fHi.anyTrue(); }
AI bool allTrue() const { return fLo.allTrue() && fHi.allTrue(); }
diff --git a/src/core/SkSafeMath.h b/src/core/SkSafeMath.h
index 0bc0fbfac4..f54be32fce 100644
--- a/src/core/SkSafeMath.h
+++ b/src/core/SkSafeMath.h
@@ -9,6 +9,7 @@
#define SkSafeMath_DEFINED
#include "SkTypes.h"
+#include <limits>
// SkSafeMath always check that a series of operations do not overflow.
// This must be correct for all platforms, because this is a check for safety at runtime.
diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h
index 1552e0c181..020c402049 100644
--- a/src/opts/SkNx_neon.h
+++ b/src/opts/SkNx_neon.h
@@ -267,7 +267,7 @@ public:
return vminvq_f32(fVec);
#else
SkNx min = Min(*this, vrev64q_f32(fVec));
- return std::min(min[0], min[2]);
+ return SkTMin(min[0], min[2]);
#endif
}
@@ -276,7 +276,7 @@ public:
return vmaxvq_f32(fVec);
#else
SkNx max = Max(*this, vrev64q_f32(fVec));
- return std::max(max[0], max[2]);
+ return SkTMax(max[0], max[2]);
#endif
}