Fixed the emplace function implementations for stack and queue (#2657)
* Fixed the emplace function implementations for stack and queue Cleaned up several functions in the stack, queue and priority_queue classes that were non-standard or weren't needed. Updated the "style" of the code to use more modern concepts: "typedef" -> "using", empty constructor body -> default keyword. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Replaced the custom implementations of AZStd stack, (proirity)queue Theses classes now have a template alias to the standard library version of the classes Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0318419932
commit
bb372f05cd
@@ -107,8 +107,10 @@ namespace Multiplayer
|
||||
void ServerToClientReplicationWindow::UpdateWindow()
|
||||
{
|
||||
// clear the candidate queue, we're going to rebuild it
|
||||
ReplicationCandidateQueue clearQueue;
|
||||
clearQueue.get_container().reserve(sv_MaxEntitiesToTrackReplication);
|
||||
ReplicationCandidateQueue::container_type clearQueueContainer;
|
||||
clearQueueContainer.reserve(sv_MaxEntitiesToTrackReplication);
|
||||
// Move the clearQueueContainer into the ReplicationCandidateQueue to maintain the reserved memory
|
||||
ReplicationCandidateQueue clearQueue(ReplicationCandidateQueue::value_compare{}, AZStd::move(clearQueueContainer));
|
||||
m_candidateQueue.swap(clearQueue);
|
||||
m_replicationSet.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user