diff options
| author | void_17 <61356189+void2012@users.noreply.github.com> | 2026-03-06 02:11:18 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 02:11:18 +0700 |
| commit | 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b (patch) | |
| tree | 953c537a5c66e328e9f4ab29626cf738112d53c0 /Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp | |
| parent | 7d6658fe5b3095f35093701b5ab669ffc291e875 (diff) | |
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp')
| -rw-r--r-- | Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp index 8cc04940..059f9b75 100644 --- a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp @@ -47,11 +47,11 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) switch(iAction) { - case ACTION_MENU_B: + case ACTION_MENU_B: ui.ShowTooltip( iPad, eToolTipButtonX, false ); ui.ShowTooltip( iPad, eToolTipButtonB, false ); - ui.ShowTooltip( iPad, eToolTipButtonA, false ); - ui.ShowTooltip( iPad, eToolTipButtonRB, false ); + ui.ShowTooltip( iPad, eToolTipButtonA, false ); + ui.ShowTooltip( iPad, eToolTipButtonRB, false ); // kill the crafting xui //ui.PlayUISFX(eSFX_Back); ui.CloseUIScenes(iPad); @@ -78,7 +78,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) int buyBMatches = player->inventory->countMatches(buyBItem); if( (buyAItem != NULL && buyAMatches >= buyAItem->count) && (buyBItem == NULL || buyBMatches >= buyBItem->count) ) { - // 4J-JEV: Fix for PS4 #7111: [PATCH 1.12] Trading Librarian villagers for multiple ‘Enchanted Books’ will cause the title to crash. + // 4J-JEV: Fix for PS4 #7111: [PATCH 1.12] Trading Librarian villagers for multiple �Enchanted Books� will cause the title to crash. int actualShopItem = m_activeOffers.at(selectedShopItem).second; m_merchant->notifyTrade(activeRecipe); @@ -186,13 +186,12 @@ void IUIScene_TradingMenu::updateDisplay() m_activeOffers.clear(); int unfilteredIndex = 0; int firstValidTrade = INT_MAX; - for(AUTO_VAR(it, unfilteredOffers->begin()); it != unfilteredOffers->end(); ++it) + for(auto& recipe : *unfilteredOffers) { - MerchantRecipe *recipe = *it; if(!recipe->isDeprecated()) { - m_activeOffers.push_back( pair<MerchantRecipe *,int>(recipe,unfilteredIndex)); - firstValidTrade = min(firstValidTrade,unfilteredIndex); + m_activeOffers.emplace_back(recipe,unfilteredIndex); + firstValidTrade = std::min<int>(firstValidTrade, unfilteredIndex); } ++unfilteredIndex; } @@ -249,7 +248,7 @@ void IUIScene_TradingMenu::updateDisplay() vector<HtmlString> *offerDescription = GetItemDescription(activeRecipe->getSellItem()); setOfferDescription(offerDescription); - + shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem(); shared_ptr<ItemInstance> buyBItem = activeRecipe->getBuyBItem(); @@ -307,7 +306,7 @@ void IUIScene_TradingMenu::updateDisplay() setRequest1RedBox(false); setRequest2RedBox(false); setRequest1Item(nullptr); - setRequest2Item(nullptr); + setRequest2Item(nullptr); vector<HtmlString> offerDescription; setOfferDescription(&offerDescription); } |
