Remove copying historyholder for now, as it causes issues.
continuous-integration/drone/push Build is passing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2021-04-11 23:29:00 +02:00
parent e2cc20d1c5
commit ba5e937dbd
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 0 additions and 15 deletions

View File

@ -67,20 +67,6 @@ namespace CreatureLib::Battling {
}
return {};
}
void CloneOnto(HistoryHolder& other) const {
if (other._top != nullptr) {
other._top->Clear();
}
free(other._memory);
other._offset = _offset;
other._capacity = _capacity;
other._memory = static_cast<uint8_t*>(malloc(_capacity));
memcpy(other._memory, _memory, _capacity);
if (_top != nullptr) {
other._top = reinterpret_cast<HistoryElement*>(other._memory + ((u8*)_top - _memory));
}
}
};
}

View File

@ -204,7 +204,6 @@ Battle* Battle::Clone() const {
battle->_random = _random;
battle->_hasEnded = _hasEnded;
battle->_battleResult = _battleResult;
_historyHolder.CloneOnto(battle->_historyHolder);
battle->_currentTurn = _currentTurn;
_volatile.Clone(battle->_volatile);