From d29dde164642e48fa4c2b368a2b51200ba2afed1 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Mon, 18 Jul 2011 03:13:57 +0000 Subject: [PATCH] # NoBoost: fix a critical issue in the foreach replacement. All local variables introduced by the loop header have longer, magic names now. This avoids unintended shadowing of other local variables. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1055 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/BoostWorkaround/boost/foreach.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/BoostWorkaround/boost/foreach.hpp b/code/BoostWorkaround/boost/foreach.hpp index e1d8d15d8..5b5df6a36 100644 --- a/code/BoostWorkaround/boost/foreach.hpp +++ b/code/BoostWorkaround/boost/foreach.hpp @@ -88,11 +88,11 @@ typename T::const_reference deref(auto_any_base const& cur, const T&) // FOREACH #define BOOST_FOREACH(item, container) \ - if(boost::foreach_detail::auto_any_base const& b = boost::foreach_detail::begin(container)) {} else \ - if(boost::foreach_detail::auto_any_base const& e = boost::foreach_detail::end(container)) {} else \ - for(;!boost::foreach_detail::done(b,e,container); boost::foreach_detail::next(b,container)) \ + if(boost::foreach_detail::auto_any_base const& foreach_magic_b = boost::foreach_detail::begin(container)) {} else \ + if(boost::foreach_detail::auto_any_base const& foreach_magic_e = boost::foreach_detail::end(container)) {} else \ + for(;!boost::foreach_detail::done(foreach_magic_b,foreach_magic_e,container); boost::foreach_detail::next(foreach_magic_b,container)) \ if (bool ugly_and_unique_break = false) {} else \ - for(item = boost::foreach_detail::deref(b,container); !ugly_and_unique_break; ugly_and_unique_break = true) + for(item = boost::foreach_detail::deref(foreach_magic_b,container); !ugly_and_unique_break; ugly_and_unique_break = true) } // end boost