Remove AUTO_VAR macro and _toString function (#592)
This commit is contained in:
@@ -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 <20>Enchanted Books<6B> will cause the title to crash.
|
||||
// 4J-JEV: Fix for PS4 #7111: [PATCH 1.12] Trading Librarian villagers for multiple <20>Enchanted Books<6B> 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user