aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/AbstractContainerScreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Client/AbstractContainerScreen.cpp')
-rw-r--r--Minecraft.Client/AbstractContainerScreen.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/Minecraft.Client/AbstractContainerScreen.cpp b/Minecraft.Client/AbstractContainerScreen.cpp
index 2b3e0837..fbf1331d 100644
--- a/Minecraft.Client/AbstractContainerScreen.cpp
+++ b/Minecraft.Client/AbstractContainerScreen.cpp
@@ -52,12 +52,9 @@ void AbstractContainerScreen::render(int xm, int ym, float a)
glEnable(GL_RESCALE_NORMAL);
Slot *hoveredSlot = NULL;
-
- AUTO_VAR(itEnd, menu->slots->end());
- for (AUTO_VAR(it, menu->slots->begin()); it != itEnd; it++)
- {
- Slot *slot = *it; //menu->slots->at(i);
+ for ( Slot *slot : *menu->slots )
+ {
renderSlot(slot);
if (isHovering(slot, xm, ym))
@@ -150,10 +147,8 @@ void AbstractContainerScreen::renderSlot(Slot *slot)
Slot *AbstractContainerScreen::findSlot(int x, int y)
{
- AUTO_VAR(itEnd, menu->slots->end());
- for (AUTO_VAR(it, menu->slots->begin()); it != itEnd; it++)
+ for (Slot* slot : menu->slots )
{
- Slot *slot = *it; //menu->slots->at(i);
if (isHovering(slot, x, y)) return slot;
}
return NULL;