From 49f4e1c72e6fed094d54113eb03a1d5d8ce3aa0a Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Tue, 7 Jan 2014 23:45:09 +0900 Subject: [PATCH] fix cxx14 sort --- sprout/algorithm/cxx14/sort.hpp | 3 ++- sprout/darkroom/objects/sphere.hpp | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sprout/algorithm/cxx14/sort.hpp b/sprout/algorithm/cxx14/sort.hpp index 4ac9ed15..ef14a3a6 100644 --- a/sprout/algorithm/cxx14/sort.hpp +++ b/sprout/algorithm/cxx14/sort.hpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -187,7 +188,7 @@ namespace sprout { typedef typename std::decay::type iterator; typedef typename std::iterator_traits::difference_type difference_type; typedef typename std::iterator_traits::value_type value_type; - SPROUT_STATIC_CONSTEXPR difference_type limit + difference_type const limit = sprout::is_trivially_copy_constructible::value && sprout::is_trivially_copy_assignable::value ? 30 : 6 diff --git a/sprout/darkroom/objects/sphere.hpp b/sprout/darkroom/objects/sphere.hpp index c53ac245..4e4ec1eb 100644 --- a/sprout/darkroom/objects/sphere.hpp +++ b/sprout/darkroom/objects/sphere.hpp @@ -110,7 +110,7 @@ namespace sprout { } template SPROUT_CONSTEXPR typename intersection::type - intersect_6(Ray const& ray, zwo_type const& zwo, drei_type const& drei,bool is_from_inside, Vec const& normal) const { + intersect_6(zwo_type const& zwo, drei_type const& drei,bool is_from_inside, Vec const& normal) const { return typename intersection::type( sprout::tuples::get(zwo), sprout::tuples::get(zwo), @@ -142,8 +142,7 @@ namespace sprout { template SPROUT_CONSTEXPR typename intersection::type intersect_5(Ray const& ray, zwo_type const& zwo, drei_type const& drei) const { - return intersect_6( - ray, + return intersect_6( zwo, drei, sprout::darkroom::coords::dot(sprout::tuples::get(drei), sprout::darkroom::rays::direction(ray)) > 0,