Rename macros to avoid name clases

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8512 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-05-03 23:50:36 +00:00
parent a4c846bbe3
commit 0f57b0b46a
6 changed files with 12 additions and 12 deletions

View File

@ -1207,7 +1207,7 @@ void IrrDriver::update(float dt)
// This code needs to go outside beginScene() / endScene() since
// the model view widget will do off-screen rendering there
GUIEngine::Widget* widget;
for_each (widget, GUIEngine::needsUpdate)
for_in (widget, GUIEngine::needsUpdate)
{
widget->update(dt);
}

View File

@ -139,7 +139,7 @@ void ModalDialog::clearWindow()
{
// TODO: extract this code and its eqauivalent from Screen into the common base class?
Widget* w;
for_each (w, m_widgets);
for_in (w, m_widgets);
{
m_irrlicht_window->removeChild( w->getIrrlichtElement() );
}

View File

@ -135,7 +135,7 @@ void Screen::unload()
{
assert(m_magic_number == 0xCAFEC001);
Widget* w;
for_each (w, m_widgets)
for_in (w, m_widgets)
{
assert(w->m_magic_number == 0xCAFEC001);
}

View File

@ -491,7 +491,7 @@ const irr::core::stringw& DynamicRibbonWidget::getSelectionText(const int player
RibbonWidget* DynamicRibbonWidget::getRowContaining(Widget* w)
{
RibbonWidget* row;
for_each (row, m_rows)
for_in (row, m_rows)
{
if (row != NULL)
{
@ -505,7 +505,7 @@ RibbonWidget* DynamicRibbonWidget::getRowContaining(Widget* w)
RibbonWidget* DynamicRibbonWidget::getSelectedRibbon(const int playerID)
{
RibbonWidget* row;
for_each (row, m_rows)
for_in (row, m_rows)
{
if (GUIEngine::isFocusedForPlayer(row, playerID))
{
@ -565,7 +565,7 @@ EventPropagation DynamicRibbonWidget::leftPressed(const int playerID)
propagateSelection();
DynamicRibbonHoverListener* listener;
for_each( listener, m_hover_listeners )
for_in( listener, m_hover_listeners )
{
listener->onSelectionChanged(this, w->getSelectionIDString(playerID),
w->getSelectionText(playerID), playerID);
@ -618,7 +618,7 @@ EventPropagation DynamicRibbonWidget::mouseHovered(Widget* child, const int play
if (getSelectedRibbon(playerID) != NULL)
{
DynamicRibbonHoverListener* listener;
for_each( listener, m_hover_listeners )
for_in( listener, m_hover_listeners )
{
listener->onSelectionChanged(this, getSelectedRibbon(playerID)->getSelectionIDString(playerID),
getSelectedRibbon(playerID)->getSelectionText(playerID), playerID);
@ -634,7 +634,7 @@ EventPropagation DynamicRibbonWidget::focused(const int playerID)
updateLabel();
DynamicRibbonHoverListener* listener;
for_each( listener, m_hover_listeners )
for_in( listener, m_hover_listeners )
{
listener->onSelectionChanged(this, getSelectedRibbon(playerID)->getSelectionIDString(playerID),
getSelectedRibbon(playerID)->getSelectionText(playerID), playerID);
@ -664,7 +664,7 @@ void DynamicRibbonWidget::onRibbonWidgetFocus(RibbonWidget* emitter, const int p
updateLabel(emitter);
DynamicRibbonHoverListener* listener;
for_each( listener, m_hover_listeners )
for_in( listener, m_hover_listeners )
{
listener->onSelectionChanged(this, emitter->getSelectionIDString(playerID),
emitter->getSelectionText(playerID), playerID);
@ -740,7 +740,7 @@ void DynamicRibbonWidget::propagateSelection()
// set same selection in all ribbons
RibbonWidget* ribbon;
for_each( ribbon, m_rows )
for_in( ribbon, m_rows )
{
if (ribbon != selected_ribbon)
{

View File

@ -186,7 +186,7 @@ const int KartPropertiesManager::getKartId(const std::string &ident) const
const KartProperties* KartPropertiesManager::getKart(const std::string &ident) const
{
const KartProperties* kp;
for_each (kp, m_karts_properties)
for_in (kp, m_karts_properties)
{
if (kp->getIdent() == ident)
return kp;

View File

@ -281,7 +281,7 @@ int init_foreach(T& val, U& vect)
return 0;
}
#define for_each( VAR, VECTOR ) for (int _foreach_i = init_foreach(VAR, VECTOR); VAR = (_foreach_i < VECTOR.size() ? VECTOR.get(_foreach_i) : NULL), _foreach_i < VECTOR.size(); _foreach_i++)
#define for_in( VAR, VECTOR ) for (int _foreach_i = init_foreach(VAR, VECTOR); VAR = (_foreach_i < VECTOR.size() ? VECTOR.get(_foreach_i) : NULL), _foreach_i < VECTOR.size(); _foreach_i++)
#endif