# 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
pull/2/head
aramis_acg 2011-07-18 03:13:57 +00:00
parent 97ce1d2bcd
commit d29dde1646
1 changed files with 4 additions and 4 deletions

View File

@ -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