Bug 834896 - Remove the gfx_min/gfx_max templates. r=joe
authorMats Palmgren <matspal@gmail.com>
Wed, 30 Jan 2013 17:02:27 +0100
changeset 120380 c8cf23a719b70acd6a58a002c0918ab1f12ca68f
parent 120379 cabffed38cccabd04d4ee5e4238f5142ee6d7cf3
child 120381 a9ba0d91735831824c50b58eaa905ce6badc5b9a
push id24251
push userryanvm@gmail.com
push dateThu, 31 Jan 2013 20:56:22 +0000
treeherdermozilla-central@683b08dc1afd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe
bugs834896
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 834896 - Remove the gfx_min/gfx_max templates. r=joe
gfx/2d/BaseRect.h
--- a/gfx/2d/BaseRect.h
+++ b/gfx/2d/BaseRect.h
@@ -8,30 +8,16 @@
 
 #include <cmath>
 #include <mozilla/Assertions.h>
 #include <algorithm>
 
 namespace mozilla {
 namespace gfx {
 
-// XXX - <algorithm> conflicts with exceptions on 10.6. Define our own gfx_min/gfx_max
-// functions here. Avoid min/max to avoid conflicts with existing #defines on windows.
-template<typename T>
-T gfx_min(T aVal1, T aVal2)
-{
-  return (aVal1 < aVal2) ? aVal1 : aVal2;
-}
-
-template<typename T>
-T gfx_max(T aVal1, T aVal2)
-{
-  return (aVal1 > aVal2) ? aVal1 : aVal2;
-}
-
 /**
  * Rectangles have two interpretations: a set of (zero-size) points,
  * and a rectangular area of the plane. Most rectangle operations behave
  * the same no matter what interpretation is being used, but some operations
  * differ:
  * -- Equality tests behave differently. When a rectangle represents an area,
  * all zero-width and zero-height rectangles are equal to each other since they
  * represent the empty area. But when a rectangle represents a set of