Update to 14.0-beta1
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include "core/pool_func.hpp"
|
||||
#include "core/endian_func.hpp"
|
||||
#include "debug.h"
|
||||
#include <set>
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -52,7 +51,7 @@ void AddChangedPersistentStorage(BasePersistentStorageArray *storage)
|
||||
* @param mode Mode switch affecting temporary/persistent changes.
|
||||
* @param ignore_prev_mode Disable some sanity checks for exceptional call circumstances.
|
||||
*/
|
||||
/* static */ void BasePersistentStorageArray::SwitchMode(PersistentStorageMode mode, bool ignore_prev_mode)
|
||||
/* static */ void BasePersistentStorageArray::SwitchMode(PersistentStorageMode mode, [[maybe_unused]] bool ignore_prev_mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case PSM_ENTER_GAMELOOP:
|
||||
@@ -91,9 +90,9 @@ void AddChangedPersistentStorage(BasePersistentStorageArray *storage)
|
||||
}
|
||||
|
||||
/* Discard all temporary changes */
|
||||
for (std::set<BasePersistentStorageArray*>::iterator it = _changed_storage_arrays->begin(); it != _changed_storage_arrays->end(); it++) {
|
||||
Debug(desync, 1, "Discarding persistent storage changes: Feature {}, GrfID {:08X}, Tile {}", (*it)->feature, BSWAP32((*it)->grfid), (*it)->tile);
|
||||
(*it)->ClearChanges();
|
||||
for (auto &it : *_changed_storage_arrays) {
|
||||
Debug(desync, 1, "Discarding persistent storage changes: Feature {}, GrfID {:08X}, Tile {}", it->feature, BSWAP32(it->grfid), it->tile);
|
||||
it->ClearChanges();
|
||||
}
|
||||
_changed_storage_arrays->clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user