MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / ~GraphsState

Method ~GraphsState

src/Geoscape/GraphsState.cpp:312–334  ·  view source on GitHub ↗

* */

Source from the content-addressed store, hash-verified

310 *
311 */
312GraphsState::~GraphsState()
313{
314 std::string graphRegionToggles = "";
315 std::string graphCountryToggles = "";
316 std::string graphFinanceToggles = "";
317 for (size_t i = 0; i < _regionToggles.size(); ++i)
318 {
319 graphRegionToggles.push_back(_regionToggles[i]->_pushed ? '1' : '0');
320 delete _regionToggles[i];
321 }
322 for (size_t i = 0; i < _countryToggles.size(); ++i)
323 {
324 graphCountryToggles.push_back(_countryToggles[i]->_pushed ? '1' : '0');
325 delete _countryToggles[i];
326 }
327 for (size_t i = 0; i < _financeToggles.size(); ++i)
328 {
329 graphFinanceToggles.push_back(_financeToggles[i] ? '1' : '0');
330 }
331 _game->getSavedGame()->setGraphRegionToggles(graphRegionToggles);
332 _game->getSavedGame()->setGraphCountryToggles(graphCountryToggles);
333 _game->getSavedGame()->setGraphFinanceToggles(graphFinanceToggles);
334}
335
336/**
337 * Returns to the previous screen.

Callers

nothing calls this directly

Calls 4

setGraphRegionTogglesMethod · 0.80
getSavedGameMethod · 0.80

Tested by

no test coverage detected