Legacy cleanup, part 2 (#3659)
* Legacy cleanup, part 2 There are still things that can be removed, those will be likely done in part three: `The Return of the Cleanup` :) Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Fix windows build Somehow there were some unfixed errors from enabled warnings? I'm unsure if I've pulled repo in unstable state, or those were somehow missed. Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
@@ -2057,53 +2057,7 @@ bool CBaseObject::IsChildOf(CBaseObject* node)
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CBaseObject::GetAllChildren(TBaseObjects& outAllChildren, CBaseObject* pObj) const
|
||||
{
|
||||
const CBaseObject* pBaseObj = pObj ? pObj : this;
|
||||
|
||||
for (size_t i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
{
|
||||
CBaseObject* pChild = pBaseObj->GetChild(i);
|
||||
if (pChild == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
outAllChildren.push_back(pChild);
|
||||
GetAllChildren(outAllChildren, pChild);
|
||||
}
|
||||
}
|
||||
|
||||
void CBaseObject::GetAllChildren(DynArray< _smart_ptr<CBaseObject> >& outAllChildren, CBaseObject* pObj) const
|
||||
{
|
||||
const CBaseObject* pBaseObj = pObj ? pObj : this;
|
||||
|
||||
for (size_t i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
{
|
||||
CBaseObject* pChild = pBaseObj->GetChild(i);
|
||||
if (pChild == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
outAllChildren.push_back(pChild);
|
||||
GetAllChildren(outAllChildren, pChild);
|
||||
}
|
||||
}
|
||||
|
||||
void CBaseObject::GetAllChildren(CSelectionGroup& outAllChildren, CBaseObject* pObj) const
|
||||
{
|
||||
const CBaseObject* pBaseObj = pObj ? pObj : this;
|
||||
|
||||
for (size_t i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
{
|
||||
CBaseObject* pChild = pBaseObj->GetChild(i);
|
||||
if (pChild == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
outAllChildren.AddObject(pChild);
|
||||
GetAllChildren(outAllChildren, pChild);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CBaseObject::CloneChildren(CBaseObject* pFromObject)
|
||||
|
||||
@@ -408,10 +408,6 @@ public:
|
||||
CBaseObject* GetParent() const { return m_parent; };
|
||||
//! Scans hierarchy up to determine if we child of specified node.
|
||||
virtual bool IsChildOf(CBaseObject* node);
|
||||
//! Get all child objects
|
||||
void GetAllChildren(TBaseObjects& outAllChildren, CBaseObject* pObj = nullptr) const;
|
||||
void GetAllChildren(DynArray< _smart_ptr<CBaseObject> >& outAllChildren, CBaseObject* pObj = nullptr) const;
|
||||
void GetAllChildren(CSelectionGroup& outAllChildren, CBaseObject* pObj = nullptr) const;
|
||||
//! Clone Children
|
||||
void CloneChildren(CBaseObject* pFromObject);
|
||||
//! Attach new child node.
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "SandboxAPI.h"
|
||||
#include <Cry_Color.h>
|
||||
#include <Cry_Geo.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
|
||||
#include <QColor>
|
||||
|
||||
|
||||
@@ -759,16 +759,16 @@ void CObjectManager::GetObjects(CBaseObjectsArray& objects) const
|
||||
}
|
||||
}
|
||||
|
||||
void CObjectManager::GetObjects(DynArray<CBaseObject*>& objects) const
|
||||
{
|
||||
CBaseObjectsArray objectArray;
|
||||
GetObjects(objectArray);
|
||||
objects.clear();
|
||||
for (size_t i = 0, iCount(objectArray.size()); i < iCount; ++i)
|
||||
{
|
||||
objects.push_back(objectArray[i]);
|
||||
}
|
||||
}
|
||||
//void CObjectManager::GetObjects(DynArray<CBaseObject*>& objects) const
|
||||
//{
|
||||
// CBaseObjectsArray objectArray;
|
||||
// GetObjects(objectArray);
|
||||
// objects.clear();
|
||||
// for (size_t i = 0, iCount(objectArray.size()); i < iCount; ++i)
|
||||
// {
|
||||
// objects.push_back(objectArray[i]);
|
||||
// }
|
||||
//}
|
||||
|
||||
void CObjectManager::GetObjects(CBaseObjectsArray& objects, BaseObjectFilterFunctor const& filter) const
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
//! Get array of objects, managed by manager (not contain sub objects of groups).
|
||||
//! @param layer if 0 get objects for all layers, or layer to get objects from.
|
||||
void GetObjects(CBaseObjectsArray& objects) const;
|
||||
void GetObjects(DynArray<CBaseObject*>& objects) const;
|
||||
//void GetObjects(DynArray<CBaseObject*>& objects) const;
|
||||
|
||||
//! Get array of objects that pass the filter.
|
||||
//! @param filter The filter functor, return true if you want to get the certain obj, return false if want to skip it.
|
||||
|
||||
Reference in New Issue
Block a user