File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -2158,19 +2158,11 @@ void BuyMenuGUI::AddObjectsToItemList(std::vector<std::list<Entity*>>& moduleLis
2158
2158
2159
2159
void BuyMenuGUI::AddPresetsToItemList () {
2160
2160
m_SelectedLoadoutIndex = -1 ;
2161
-
2162
- AllegroBitmap* pItemBitmap = 0 ;
2163
- std::string loadoutLabel;
2164
- float loadoutCost;
2165
- const Actor* pPassenger = 0 ;
2166
- char costString[256 ];
2167
2161
2168
2162
// Go through all the presets, making intelligible list items from then for the GUI item list
2169
2163
for (std::vector<Loadout>::iterator lItr = m_Loadouts.begin (); lItr != m_Loadouts.end (); ++lItr) {
2170
- loadoutLabel.clear ();
2171
- loadoutCost = 0 ;
2172
- pItemBitmap = 0 ;
2173
- pPassenger = 0 ;
2164
+ AllegroBitmap* pItemBitmap = nullptr ;
2165
+ float loadoutCost = 0 ;
2174
2166
2175
2167
int bitmapHeight = 0 ;
2176
2168
int bitmapWidth = 0 ;
@@ -2220,8 +2212,8 @@ void BuyMenuGUI::AddPresetsToItemList() {
2220
2212
loadoutCost += sceneObject->GetGoldValue (m_NativeTechModule, m_ForeignCostMult);
2221
2213
}
2222
2214
2223
- // Passing in ownership of the bitmap, but not of the pSpriteObj
2224
- m_pShopList->AddItem (" " , costString , pItemBitmap);
2215
+ // Passing in ownership of the bitmap
2216
+ m_pShopList->AddItem (" " , std::to_string (loadoutCost) , pItemBitmap, 0 );
2225
2217
}
2226
2218
}
2227
2219
You can’t perform that action at this time.
0 commit comments