Legacy code cleanup - part 3 (#3903)

* Legacy cleanup - part 3

Not much is left that can be easily removed,
so I think this will be last cleanup before the legacy functionality is replaced.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* fix windows build, remove a few more things, re-add one file

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove legacy RenderBus + more cleanups

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove MaterialOwnerBus.h

Clean-up in Cry_Matrix34/33

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
Artur K
2021-09-07 20:14:16 +02:00
committed by GitHub
parent 4d5b047c1b
commit 2a2847b15d
161 changed files with 894 additions and 16076 deletions
@@ -6,13 +6,9 @@
*
*/
#ifndef CRYINCLUDE_CRYCOMMON_MULTITHREAD_CONTAINERS_H
#define CRYINCLUDE_CRYCOMMON_MULTITHREAD_CONTAINERS_H
#pragma once
#include "StlUtils.h"
#include "BitFiddling.h"
#include <queue>
#include <set>
@@ -43,8 +39,6 @@ namespace CryMT
const T& back() const { AutoLock lock(m_cs); return v.back(); }
void push(const T& x) { AutoLock lock(m_cs); return v.push_back(x); };
void reserve(const size_t n) { AutoLock lock(m_cs); v.reserve(n); };
// classic pop function of queue should not be used for thread safety, use try_pop instead
//void pop() { AutoLock lock(m_cs); return v.erase(v.begin()); };
AZStd::recursive_mutex& get_lock() const { return m_cs; }
@@ -69,27 +63,6 @@ namespace CryMT
return false;
};
//////////////////////////////////////////////////////////////////////////
bool try_remove(const T& value)
{
AutoLock lock(m_cs);
if (!v.empty())
{
typename container_type::iterator it = std::find(v.begin(), v.end(), value);
if (it != v.end())
{
v.erase(it);
return true;
}
}
return false;
};
template<typename Sizer>
void GetMemoryUsage(Sizer* pSizer) const
{
pSizer->AddObject(v);
}
private:
container_type v;
mutable AZStd::recursive_mutex m_cs;
@@ -104,6 +77,3 @@ namespace stl
v.free_memory();
}
}
#endif // CRYINCLUDE_CRYCOMMON_MULTITHREAD_CONTAINERS_H