Make battle class fields all smart pointers.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -62,15 +62,14 @@ void Battle::CheckChoicesSetAndRun() {
|
||||
}
|
||||
_currentTurn++;
|
||||
TurnOrdering::OrderChoices(choices, _random.GetRNG());
|
||||
this->_currentTurnQueue = new ChoiceQueue(choices);
|
||||
this->_currentTurnQueue.reset(new ChoiceQueue(choices));
|
||||
TurnHandler::RunTurn(this->_currentTurnQueue);
|
||||
if (this->_currentTurnQueue->HasCompletedQueue) {
|
||||
delete this->_currentTurnQueue;
|
||||
this->_currentTurnQueue = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
ChoiceQueue* Battle::GetCurrentTurnQueue() const noexcept { return _currentTurnQueue; }
|
||||
ArbUt::BorrowedPtr<ChoiceQueue> Battle::GetCurrentTurnQueue() const noexcept { return _currentTurnQueue; }
|
||||
|
||||
BattleRandom* Battle::GetRandom() noexcept { return &_random; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user