diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-03 03:17:20 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-03 03:17:20 +0400 |
commit | f60c5b8e22836a8d64a4b8fdb92f3d36cd8f6a8f (patch) | |
tree | 84fad001708f0ee84644694cd954fc9f9e803821 /source/blender/freestyle/intern/application/AppView.h | |
parent | 0be5cd051da224d51f946ae3ac867fa5fe36d450 (diff) |
Removed redundant definitions of __min and __max macros by replacing them with
std::min() and std::max(), respectively. Based on review comment from Campbell.
Diffstat (limited to 'source/blender/freestyle/intern/application/AppView.h')
-rw-r--r-- | source/blender/freestyle/intern/application/AppView.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/source/blender/freestyle/intern/application/AppView.h b/source/blender/freestyle/intern/application/AppView.h index 0763a33a212..7b8a892858e 100644 --- a/source/blender/freestyle/intern/application/AppView.h +++ b/source/blender/freestyle/intern/application/AppView.h @@ -32,13 +32,6 @@ * \ingroup freestyle */ -#if !defined(WIN32) || defined(__GNUC__) -# include <algorithm> -# define __min(x,y) (min(x,y)) -# define __max(x,y) (max(x,y)) - using namespace std; -#endif // WIN32 - #include "AppConfig.h" #include "../geometry/Geom.h" #include "../geometry/BBox.h" @@ -92,13 +85,13 @@ public: _ModelRootNode->AddChild(iModel); _ModelRootNode->UpdateBBox(); - _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], _ModelRootNode->bbox().getMin()[1]), - _ModelRootNode->bbox().getMin()[2]); - _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], _ModelRootNode->bbox().getMax()[1]), - _ModelRootNode->bbox().getMax()[2]); + _minBBox = std::min(std::min(_ModelRootNode->bbox().getMin()[0], _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = std::max(std::max(_ModelRootNode->bbox().getMax()[0], _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); - _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); - _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + _maxAbs = std::max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = std::min(rabs(_minBBox), rabs(_maxBBox)); } inline void AddSilhouette(NodeGroup* iSilhouette) @@ -136,13 +129,13 @@ public: _ModelRootNode->DetachChild(iModel); _ModelRootNode->UpdateBBox(); - _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], _ModelRootNode->bbox().getMin()[1]), - _ModelRootNode->bbox().getMin()[2]); - _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], _ModelRootNode->bbox().getMax()[1]), - _ModelRootNode->bbox().getMax()[2]); + _minBBox = std::min(std::min(_ModelRootNode->bbox().getMin()[0], _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = std::max(std::max(_ModelRootNode->bbox().getMax()[0], _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); - _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); - _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + _maxAbs = std::max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = std::min(rabs(_minBBox), rabs(_maxBBox)); } inline void DetachModel() |