[Scummvm-git-logs] scummvm master -> f5be1cf5126fd7de9b98f7fd6123075ee7d9e221
grisenti
noreply at scummvm.org
Mon Jan 30 22:13:58 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f5be1cf512 HPL1: remove unused class
Commit: f5be1cf5126fd7de9b98f7fd6123075ee7d9e221
https://github.com/scummvm/scummvm/commit/f5be1cf5126fd7de9b98f7fd6123075ee7d9e221
Author: grisenti (emanuele at grisenti.net)
Date: 2023-01-30T23:13:48+01:00
Commit Message:
HPL1: remove unused class
Changed paths:
R engines/hpl1/engine/libraries/newton/core/dgRtti.h
engines/hpl1/engine/libraries/newton/core/dg.h
engines/hpl1/engine/libraries/newton/core/dgNode.cpp
engines/hpl1/engine/libraries/newton/core/dgNode.h
engines/hpl1/engine/libraries/newton/core/dgRef.cpp
engines/hpl1/engine/libraries/newton/core/dgRef.h
diff --git a/engines/hpl1/engine/libraries/newton/core/dg.h b/engines/hpl1/engine/libraries/newton/core/dg.h
index bb3c246756b..b572b1926fc 100644
--- a/engines/hpl1/engine/libraries/newton/core/dg.h
+++ b/engines/hpl1/engine/libraries/newton/core/dg.h
@@ -26,7 +26,6 @@
#include "dgRef.h"
#include "dgCRC.h"
-#include "dgRtti.h"
#include "dgList.h"
#include "dgTree.h"
#include "dgNode.h"
diff --git a/engines/hpl1/engine/libraries/newton/core/dgNode.cpp b/engines/hpl1/engine/libraries/newton/core/dgNode.cpp
index ef7144dd748..af2fc092414 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgNode.cpp
+++ b/engines/hpl1/engine/libraries/newton/core/dgNode.cpp
@@ -22,8 +22,6 @@
#include "dgStdafx.h"
#include "dgNode.h"
-dgInitRtti(dgBaseNode);
-
dgBaseNode::dgBaseNode(const dgBaseNode &clone) :
dgRef(clone) {
dgBaseNode *obj;
diff --git a/engines/hpl1/engine/libraries/newton/core/dgNode.h b/engines/hpl1/engine/libraries/newton/core/dgNode.h
index 17ca7a84a6a..41cb9cf857a 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgNode.h
+++ b/engines/hpl1/engine/libraries/newton/core/dgNode.h
@@ -25,7 +25,6 @@
#include "dgStdafx.h"
#include "dgCRC.h"
#include "dgRef.h"
-#include "dgRtti.h"
#include "common/util.h"
@@ -75,7 +74,6 @@ protected:
private:
inline void Clear();
- dgAddRtti(dgRef);
dgBaseNode *parent;
dgBaseNode *child;
dgBaseNode *sibling;
diff --git a/engines/hpl1/engine/libraries/newton/core/dgRef.cpp b/engines/hpl1/engine/libraries/newton/core/dgRef.cpp
index 4b90512ee1c..4c17121711a 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgRef.cpp
+++ b/engines/hpl1/engine/libraries/newton/core/dgRef.cpp
@@ -24,8 +24,6 @@
#include "dgList.h"
#include "dgTree.h"
-dgRtti dgRef::m_rtti("dgRef");
-
void dgRef::AttachRef(dgRef **oldObj, dgRef *newObj) {
if (*oldObj) {
(*oldObj)->Release();
diff --git a/engines/hpl1/engine/libraries/newton/core/dgRef.h b/engines/hpl1/engine/libraries/newton/core/dgRef.h
index fd1d324fee2..7c83a82d6a4 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgRef.h
+++ b/engines/hpl1/engine/libraries/newton/core/dgRef.h
@@ -24,7 +24,6 @@
#include "dgStdafx.h"
#include "dgCRC.h"
-#include "dgRtti.h"
#include "dgDebug.h"
#include "dgMemory.h"
@@ -59,8 +58,6 @@ public:
DG_CLASS_ALLOCATOR(allocator)
virtual dgRef *CreateClone() const;
- virtual dgUnsigned32 GetTypeId() const;
- virtual bool IsType(dgUnsigned32 typeId) const;
bool GetUserFlag0() const;
bool GetUserFlag1() const;
@@ -78,8 +75,6 @@ public:
void AttachRef(dgRef **oldRef, dgRef *newRef);
-
- bool IsTypeByName(const char *typeName) const;
static dgUnsigned32 GetRttiType();
protected:
@@ -87,7 +82,6 @@ protected:
private:
dgUnsigned32 m_id;
- static dgRtti m_rtti;
};
@@ -147,23 +141,6 @@ inline dgRef *dgRef::CreateClone() const {
}
-inline dgUnsigned32 dgRef::GetTypeId() const {
- return m_rtti.GetTypeId();
-}
-
-inline bool dgRef::IsType(dgUnsigned32 typeId) const {
- return m_rtti.IsTypeID(typeId);
-}
-
-inline dgUnsigned32 dgRef::GetRttiType() {
- return m_rtti.GetTypeId();
-}
-
-inline bool dgRef::IsTypeByName(const char *typeName) const {
- return IsType(dgCRC(typeName, (dgInt32) strlen(typeName)));
-}
-
-
inline bool dgRef::GetUserFlag0() const {
return m_userFlag0 ? true : false;
}
diff --git a/engines/hpl1/engine/libraries/newton/core/dgRtti.h b/engines/hpl1/engine/libraries/newton/core/dgRtti.h
deleted file mode 100644
index 0462bd173e2..00000000000
--- a/engines/hpl1/engine/libraries/newton/core/dgRtti.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright (c) <2003-2011> <Julio Jerez, Newton Game Dynamics>
-*
-* This software is provided 'as-is', without any express or implied
-* warranty. In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-* claim that you wrote the original software. If you use this software
-* in a product, an acknowledgment in the product documentation would be
-* appreciated but is not required.
-*
-* 2. Altered source versions must be plainly marked as such, and must not be
-* misrepresented as being the original software.
-*
-* 3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef __dgRtti__
-#define __dgRtti__
-
-#include "dgStdafx.h"
-#include "dgCRC.h"
-
-class dgRtti {
-public:
- dgRtti(const char *typeName);
- dgUnsigned32 GetTypeId() const;
- bool IsTypeID(dgUnsigned32 id) const;
-
-private:
- dgUnsigned32 m_TypeId;
-};
-
-inline dgRtti::dgRtti(const char *typeName) {
- m_TypeId = dgCRC(typeName, (dgInt32) strlen(typeName));
-}
-
-inline dgUnsigned32 dgRtti::GetTypeId() const {
- return m_TypeId;
-}
-
-inline bool dgRtti::IsTypeID(dgUnsigned32 id) const {
- return m_TypeId == id;
-}
-
-
-
-#define dgAddRtti(baseClass) \
- private: \
- static dgRtti rtti; \
- public: \
- virtual bool IsType (dgUnsigned32 typeId) const \
- { \
- if (rtti.IsTypeID (typeId)) { \
- return true; \
- } \
- return baseClass::IsType (typeId); \
- } \
- virtual dgUnsigned32 GetTypeId () const \
- { \
- return rtti.GetTypeId (); \
- } \
- static dgUnsigned32 GetRttiType() \
- { \
- return rtti.GetTypeId(); \
- }
-
-
-#define dgInitRtti(className) \
- dgRtti className::rtti (#className)
-
-#endif
-
More information about the Scummvm-git-logs
mailing list