Compilation fixes for C++20

This commit is contained in:
Jeff Hutchinson 2022-11-27 23:08:07 -05:00
parent e16351605b
commit 1940becb2d
40 changed files with 220 additions and 211 deletions

View file

@ -133,6 +133,11 @@ namespace Sim
SimObject* findObject(const char* name);
SimObject* findObject(const char* fileName, S32 declarationLine);
inline SimObject* findObject(const String& name)
{
return findObject(name.c_str());
}
template<class T> inline bool findObject(SimObjectId iD,T*&t)
{
t = dynamic_cast<T*>(findObject(iD));
@ -143,6 +148,11 @@ namespace Sim
t = dynamic_cast<T*>(findObject(objectName));
return t != NULL;
}
template<class T> inline bool findObject(const String& objectName, T*& t)
{
t = dynamic_cast<T*>(findObject(objectName));
return t != NULL;
}
SimObject *spawnObject(String spawnClass,
String spawnDataBlock = String::EmptyString,