From d91253515c42e9fb48faab1d5d0e93b05e677784 Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Tue, 10 Apr 2018 12:52:31 -0500 Subject: [PATCH] Initialize RTTI's mInitMembers object with 'this' by default, removing the need to initialize it in every RTTI-able object. --- .../Manuals/User/serializingObjects.md | 16 +------- .../Private/RTTI/BsAnimationClipRTTI.h | 8 +--- .../RTTI/BsAudioClipImportOptionsRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsAudioClipRTTI.h | 3 +- .../Private/RTTI/BsAudioListenerRTTI.h | 4 -- .../bsfCore/Private/RTTI/BsAudioSourceRTTI.h | 4 -- .../bsfCore/Private/RTTI/BsCAnimationRTTI.h | 6 +-- .../Private/RTTI/BsCAudioListenerRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCAudioSourceRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCBoneRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCBoxColliderRTTI.h | 6 +-- .../Private/RTTI/BsCCapsuleColliderRTTI.h | 6 +-- .../Private/RTTI/BsCCharacterControllerRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCColliderRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCD6JointRTTI.h | 13 +++--- .../Private/RTTI/BsCDistanceJointRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCHingeJointRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCJointRTTI.h | 5 +-- .../Private/RTTI/BsCLightProbeVolumeRTTI.h | 6 +-- .../Private/RTTI/BsCMeshColliderRTTI.h | 6 +-- .../Private/RTTI/BsCPlaneColliderRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCRigidbodyRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCSliderJointRTTI.h | 6 +-- .../Private/RTTI/BsCSphereColliderRTTI.h | 6 +-- .../Private/RTTI/BsCSphericalJointRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsCameraRTTI.h | 10 ++--- .../bsfCore/Private/RTTI/BsFontRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsGpuProgramRTTI.h | 14 +------ .../Private/RTTI/BsLightProbeVolumeRTTI.h | 22 +++++----- .../bsfCore/Private/RTTI/BsLightRTTI.h | 8 +--- .../Private/RTTI/BsMaterialParamsRTTI.h | 6 +-- .../Private/RTTI/BsMeshImportOptionsRTTI.h | 14 +------ .../bsfCore/Private/RTTI/BsMeshRTTI.h | 3 +- .../bsfCore/Private/RTTI/BsMorphShapesRTTI.h | 16 +------- .../bsfCore/Private/RTTI/BsPassRTTI.h | 11 ++--- .../bsfCore/Private/RTTI/BsPhysicsMeshRTTI.h | 10 +---- .../bsfCore/Private/RTTI/BsPrefabDiffRTTI.h | 14 +------ .../bsfCore/Private/RTTI/BsPrefabRTTI.h | 3 +- .../Private/RTTI/BsReflectionProbeRTTI.h | 6 +-- .../Private/RTTI/BsRenderSettingsRTTI.h | 40 +------------------ .../bsfCore/Private/RTTI/BsRenderableRTTI.h | 8 +--- .../Private/RTTI/BsSavedResourceDataRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsShaderRTTI.h | 7 +--- .../Private/RTTI/BsShaderVariationRTTI.h | 6 --- .../bsfCore/Private/RTTI/BsSkyboxRTTI.h | 4 -- .../bsfCore/Private/RTTI/BsTechniqueRTTI.h | 6 +-- .../Private/RTTI/BsTextureImportOptionsRTTI.h | 6 +-- .../bsfCore/Private/RTTI/BsTextureRTTI.h | 3 +- .../bsfCore/Private/RTTI/BsTransformRTTI.h | 4 -- .../bsfCore/Private/RTTI/BsViewportRTTI.h | 6 +-- .../Private/RTTI/BsGUIElementStyleRTTI.h | 8 +--- .../Private/RTTI/BsGameSettingsRTTI.h | 6 +-- .../Private/RTTI/BsResourceMappingRTTI.h | 6 +-- .../RTTI/BsScriptCodeImportOptionsRTTI.h | 6 +-- .../bsfEngine/Private/RTTI/BsScriptCodeRTTI.h | 6 +-- .../Private/RTTI/BsSpriteTextureRTTI.h | 6 +-- .../Private/RTTI/BsIReflectableRTTI.h | 2 - .../Private/RTTI/BsSerializedObjectRTTI.h | 2 - .../bsfUtility/Reflection/BsRTTIType.h | 4 +- 59 files changed, 78 insertions(+), 368 deletions(-) diff --git a/Documentation/Manuals/User/serializingObjects.md b/Documentation/Manuals/User/serializingObjects.md index f18c960b3..c777ca0ba 100644 --- a/Documentation/Manuals/User/serializingObjects.md +++ b/Documentation/Manuals/User/serializingObjects.md @@ -145,15 +145,11 @@ public: BS_RTTI_MEMBER_PLAIN(myString, 2) BS_END_RTTI_MEMBERS - MyComponentRTTI() - :mInitMembers(this) - { } - // ... }; ~~~~~~~~~~~~~ -Field definition portion of the RTTI type always begins with the @ref bs::BS_BEGIN_RTTI_MEMBERS "BS_BEGIN_RTTI_MEMBERS" macro, and ends with the @ref bs::BS_END_RTTI_MEMBERS "BS_END_RTTI_MEMBERS". If field definition is provided you must also provide a constructor that initializes the *mInitMembers* with the *this* pointer. +Field definition portion of the RTTI type always begins with the @ref bs::BS_BEGIN_RTTI_MEMBERS "BS_BEGIN_RTTI_MEMBERS" macro, and ends with the @ref bs::BS_END_RTTI_MEMBERS "BS_END_RTTI_MEMBERS". The field members themselves are defined by calling macros starting with BS_RTTI_MEMBER_*. The macro expects the name of the field it describes, as well as a unique ID of the field. The suffix of the BS_RTTI_MEMBER_* macro depends on the type of the field being added. There are three different types: - @ref bs::BS_RTTI_MEMBER_PLAIN "BS_RTTI_MEMBER_PLAIN" - Field containing basic data types like ints, floats, strings or other types that can be just trivially copied during serialization/deserialization. @@ -191,10 +187,6 @@ public: BS_RTTI_MEMBER_REFL(mesh, 6) BS_END_RTTI_MEMBERS - MyComponentRTTI() - :mInitMembers(this) - { } - // ... }; ~~~~~~~~~~~~~ @@ -233,10 +225,6 @@ public: BS_RTTI_MEMBER_REFL_ARRAY(meshes, 2) BS_END_RTTI_MEMBERS - MyComponentRTTI() - :mInitMembers(this) - { } - // ... }; ~~~~~~~~~~~~~ @@ -270,4 +258,4 @@ UINT8* data = ms.encode(myObject.get(), size); SPtr myObjectCopy2 = ms.decode(data, size); bs_free(data); -~~~~~~~~~~~~~ \ No newline at end of file +~~~~~~~~~~~~~ diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsAnimationClipRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsAnimationClipRTTI.h index 83e595672..2f5a3a765 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsAnimationClipRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsAnimationClipRTTI.h @@ -79,12 +79,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN_NAMED(rootMotionRot, mRootMotion->rotation, 9) BS_END_RTTI_MEMBERS public: - AnimationClipRTTI() - :mInitMembers(this) - { - - } - void onDeserializationEnded(IReflectable* obj, const UnorderedMap& params) override { AnimationClip* clip = static_cast(obj); @@ -110,4 +104,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsAudioClipImportOptionsRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsAudioClipImportOptionsRTTI.h index 3526e3b8d..0a3574450 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsAudioClipImportOptionsRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsAudioClipImportOptionsRTTI.h @@ -23,10 +23,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mBitDepth, 3) BS_END_RTTI_MEMBERS public: - AudioClipImportOptionsRTTI() - :mInitMembers(this) - { } - /** @copydoc RTTIType::getRTTIName */ const String& getRTTIName() override { @@ -49,4 +45,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsAudioClipRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsAudioClipRTTI.h index 7cdd637b0..f9e545a52 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsAudioClipRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsAudioClipRTTI.h @@ -48,7 +48,6 @@ namespace bs public: AudioClipRTTI() - :mInitMembers(this) { addDataBlockField("mData", 6, &AudioClipRTTI::getData, &AudioClipRTTI::setData, 0); } @@ -78,4 +77,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsAudioListenerRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsAudioListenerRTTI.h index 4e1546bd9..b14f3f499 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsAudioListenerRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsAudioListenerRTTI.h @@ -24,10 +24,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - AudioListenerRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "AudioListener"; diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsAudioSourceRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsAudioSourceRTTI.h index fb256d3da..d3cde5205 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsAudioSourceRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsAudioSourceRTTI.h @@ -30,10 +30,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mAttenuation, 10) BS_END_RTTI_MEMBERS public: - AudioSourceRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "AudioSource"; diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCAnimationRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCAnimationRTTI.h index 37d2489a6..83b07697c 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCAnimationRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCAnimationRTTI.h @@ -25,10 +25,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mBounds, 5) BS_END_RTTI_MEMBERS public: - CAnimationRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CAnimation"; @@ -48,4 +44,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCAudioListenerRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCAudioListenerRTTI.h index 8b713b155..58302efdb 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCAudioListenerRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCAudioListenerRTTI.h @@ -20,10 +20,6 @@ namespace bs BS_RTTI_MEMBER_REFLPTR(mInternal, 0) BS_END_RTTI_MEMBERS public: - CAudioListenerRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CAudioListener"; @@ -43,4 +39,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCAudioSourceRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCAudioSourceRTTI.h index cf1444655..aad13279e 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCAudioSourceRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCAudioSourceRTTI.h @@ -28,10 +28,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mAttenuation, 8) BS_END_RTTI_MEMBERS public: - CAudioSourceRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CAudioSource"; @@ -51,4 +47,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCBoneRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCBoneRTTI.h index b7ab13d7e..379fd89d2 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCBoneRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCBoneRTTI.h @@ -20,10 +20,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mBoneName, 0) BS_END_RTTI_MEMBERS public: - CBoneRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CBone"; @@ -43,4 +39,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCBoxColliderRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCBoxColliderRTTI.h index 8e3302de7..95f30449a 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCBoxColliderRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCBoxColliderRTTI.h @@ -21,10 +21,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mExtents, 0) BS_END_RTTI_MEMBERS public: - CBoxColliderRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CBoxCollider"; @@ -44,4 +40,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCCapsuleColliderRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCCapsuleColliderRTTI.h index 911547ea8..6e20f738e 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCCapsuleColliderRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCCapsuleColliderRTTI.h @@ -23,10 +23,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mHalfHeight, 2) BS_END_RTTI_MEMBERS public: - CCapsuleColliderRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CCapsuleCollider"; @@ -46,4 +42,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCCharacterControllerRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCCharacterControllerRTTI.h index 21ae481fb..69760ad11 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCCharacterControllerRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCCharacterControllerRTTI.h @@ -32,10 +32,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - CCharacterControllerRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CCharacterController"; @@ -55,4 +51,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCColliderRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCColliderRTTI.h index 90e7e1275..167ba407b 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCColliderRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCColliderRTTI.h @@ -27,10 +27,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mCollisionReportMode, 8) BS_END_RTTI_MEMBERS public: - CColliderRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CCollider"; @@ -51,4 +47,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCD6JointRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCD6JointRTTI.h index b42dfe731..534ef3737 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCD6JointRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCD6JointRTTI.h @@ -65,17 +65,16 @@ namespace bs public: CD6JointRTTI() - :mInitMembers(this) { - addPlainArrayField("mMotion", 0, &CD6JointRTTI::getMotion, &CD6JointRTTI::getMotionCount, + addPlainArrayField("mMotion", 0, &CD6JointRTTI::getMotion, &CD6JointRTTI::getMotionCount, &CD6JointRTTI::setMotion, &CD6JointRTTI::setMotionCount); - addPlainArrayField("mDriveStiffnes", 1, &CD6JointRTTI::getDriveStiffness, &CD6JointRTTI::getDriveCount, + addPlainArrayField("mDriveStiffnes", 1, &CD6JointRTTI::getDriveStiffness, &CD6JointRTTI::getDriveCount, &CD6JointRTTI::setDriveStiffness, &CD6JointRTTI::setDriveCount); - addPlainArrayField("mDriveDamping", 2, &CD6JointRTTI::getDriveDamping, &CD6JointRTTI::getDriveCount, + addPlainArrayField("mDriveDamping", 2, &CD6JointRTTI::getDriveDamping, &CD6JointRTTI::getDriveCount, &CD6JointRTTI::setDriveDamping, &CD6JointRTTI::setDriveCount); - addPlainArrayField("mDriveForceLimit", 3, &CD6JointRTTI::getDriveForceLimit, &CD6JointRTTI::getDriveCount, + addPlainArrayField("mDriveForceLimit", 3, &CD6JointRTTI::getDriveForceLimit, &CD6JointRTTI::getDriveCount, &CD6JointRTTI::setDriveForceLimit, &CD6JointRTTI::setDriveCount); - addPlainArrayField("mDriveAcceleartion", 4, &CD6JointRTTI::getDriveAcceleration, &CD6JointRTTI::getDriveCount, + addPlainArrayField("mDriveAcceleartion", 4, &CD6JointRTTI::getDriveAcceleration, &CD6JointRTTI::getDriveCount, &CD6JointRTTI::setDriveAcceleration, &CD6JointRTTI::setDriveCount); } @@ -98,4 +97,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCDistanceJointRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCDistanceJointRTTI.h index 857fb7251..edc9ac683 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCDistanceJointRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCDistanceJointRTTI.h @@ -26,10 +26,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - CDistanceJointRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CDistanceJoint"; @@ -49,4 +45,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCHingeJointRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCHingeJointRTTI.h index 71755d4c7..dd3ef35ca 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCHingeJointRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCHingeJointRTTI.h @@ -31,10 +31,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - CHingeJointRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CHingeJoint"; @@ -54,4 +50,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCJointRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCJointRTTI.h index 2de751d69..02546892c 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCJointRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCJointRTTI.h @@ -26,7 +26,7 @@ namespace bs BS_RTTI_MEMBER_PLAIN_NAMED(mRotationB, mRotations[1], 5) BS_END_RTTI_MEMBERS - float& getBreakForce(OwnerType* obj) { return obj->mDesc.breakForce; } + float& getBreakForce(OwnerType* obj) { return obj->mDesc.breakForce; } void setBreakForce(OwnerType* obj, float& val) { obj->mDesc.breakForce = val; } float& getBreakTorque(OwnerType* obj) { return obj->mDesc.breakTorque; } @@ -37,7 +37,6 @@ namespace bs public: CJointRTTI() - :mInitMembers(this) { addPlainField("BreakForce", 6, &CJointRTTI::getBreakForce, &CJointRTTI::setBreakForce); addPlainField("BreakTorque", 7, &CJointRTTI::getBreakTorque, &CJointRTTI::setBreakTorque); @@ -64,4 +63,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCLightProbeVolumeRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCLightProbeVolumeRTTI.h index d5241939f..e7ed7bde5 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCLightProbeVolumeRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCLightProbeVolumeRTTI.h @@ -22,10 +22,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - CLightProbeVolumeRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CLightProbeVolume"; @@ -45,4 +41,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCMeshColliderRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCMeshColliderRTTI.h index a6cfe62d0..0e9421ceb 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCMeshColliderRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCMeshColliderRTTI.h @@ -21,10 +21,6 @@ namespace bs BS_RTTI_MEMBER_REFL(mMesh, 0) BS_END_RTTI_MEMBERS public: - CMeshColliderRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CMeshCollider"; @@ -44,4 +40,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCPlaneColliderRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCPlaneColliderRTTI.h index 7a89ef15d..8d5b2855e 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCPlaneColliderRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCPlaneColliderRTTI.h @@ -22,10 +22,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mDistance, 1) BS_END_RTTI_MEMBERS public: - CPlaneColliderRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CPlaneCollider"; @@ -45,4 +41,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCRigidbodyRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCRigidbodyRTTI.h index 4884a2a32..8c7051653 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCRigidbodyRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCRigidbodyRTTI.h @@ -34,10 +34,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mCollisionReportMode, 14) BS_END_RTTI_MEMBERS public: - CRigidbodyRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CRigidbody"; @@ -57,4 +53,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCSliderJointRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCSliderJointRTTI.h index 17496dd20..9f4ac4175 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCSliderJointRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCSliderJointRTTI.h @@ -26,10 +26,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN_NAMED(mSpringStiffness, mDesc.limit.spring.stiffness, 6) BS_END_RTTI_MEMBERS public: - CSliderJointRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CSliderJoint"; @@ -49,4 +45,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCSphereColliderRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCSphereColliderRTTI.h index 5bd729557..e97d73409 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCSphereColliderRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCSphereColliderRTTI.h @@ -21,10 +21,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mRadius, 0) BS_END_RTTI_MEMBERS public: - CSphereColliderRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CSphereCollider"; @@ -44,4 +40,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCSphericalJointRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCSphericalJointRTTI.h index ca78bca40..0786c7dbe 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCSphericalJointRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCSphericalJointRTTI.h @@ -26,10 +26,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN_NAMED(mSpringStiffness, mDesc.limit.spring.stiffness, 6) BS_END_RTTI_MEMBERS public: - CSphericalJointRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "CSphericalJoint"; @@ -49,4 +45,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsCameraRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsCameraRTTI.h index 2b815a7e5..a6f42e1df 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsCameraRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsCameraRTTI.h @@ -43,17 +43,13 @@ namespace bs BS_RTTI_MEMBER_REFLPTR(mRenderSettings, 23) BS_RTTI_MEMBER_PLAIN(mMain, 24) BS_END_RTTI_MEMBERS - - public: - CameraRTTI() - :mInitMembers(this) - { } + public: void onDeserializationEnded(IReflectable* obj, const UnorderedMap& params) override { // Note: Since this is a CoreObject I should call initialize() right after deserialization, // but since this specific type is used in Components we delay initialization until Component - // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component + // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component // purposes (you'll need to call initialize manually). } @@ -76,4 +72,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsFontRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsFontRTTI.h index 43ae612c8..1d75fd77d 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsFontRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsFontRTTI.h @@ -28,10 +28,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - FontBitmapRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "FontData"; @@ -133,4 +129,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsGpuProgramRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsGpuProgramRTTI.h index 14368449d..7d0a7d483 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsGpuProgramRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsGpuProgramRTTI.h @@ -27,10 +27,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - GpuProgramBytecodeRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "GpuProgramBytecode"; @@ -61,10 +57,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - GpuParamDescRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "GpuParamDesc"; @@ -94,10 +86,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - GpuProgramRTTI() - :mInitMembers(this) - { } - void onSerializationStarted(IReflectable* obj, const UnorderedMap& params) override { // Need to ensure the core thread object is initialized @@ -130,4 +118,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsLightProbeVolumeRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsLightProbeVolumeRTTI.h index 0d47553d9..89a3235ef 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsLightProbeVolumeRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsLightProbeVolumeRTTI.h @@ -26,11 +26,11 @@ namespace bs }; template<> struct RTTIPlainType - { + { enum { id = TID_SavedLightProbeInfo }; enum { hasDynamicSize = 1 }; static void toMemory(const SavedLightProbeInfo& data, char* memory) - { + { UINT32 size = getDynamicSize(data); UINT32 curSize = sizeof(UINT32); @@ -45,9 +45,9 @@ namespace bs } static UINT32 fromMemory(SavedLightProbeInfo& data, char* memory) - { + { UINT32 size; - memcpy(&size, memory, sizeof(UINT32)); + memcpy(&size, memory, sizeof(UINT32)); memory += sizeof(UINT32); UINT32 version; @@ -67,8 +67,8 @@ namespace bs return size; } - static UINT32 getDynamicSize(const SavedLightProbeInfo& data) - { + static UINT32 getDynamicSize(const SavedLightProbeInfo& data) + { UINT64 dataSize = rttiGetElemSize(data.positions) + rttiGetElemSize(data.coefficients) + sizeof(UINT32) * 2; #if BS_DEBUG_MODE @@ -79,8 +79,8 @@ namespace bs #endif return (UINT32)dataSize; - } - }; + } + }; class BS_CORE_EXPORT LightProbeVolumeRTTI : public RTTIType { @@ -134,10 +134,8 @@ namespace bs } public: LightProbeVolumeRTTI() - :mInitMembers(this) { - - addPlainField("mProbeInfo", 5, &LightProbeVolumeRTTI::getProbeInfo, &LightProbeVolumeRTTI::setProbeInfo, + addPlainField("mProbeInfo", 5, &LightProbeVolumeRTTI::getProbeInfo, &LightProbeVolumeRTTI::setProbeInfo, RTTI_Flag_SkipInReferenceSearch); } @@ -152,7 +150,7 @@ namespace bs { // Note: Since this is a CoreObject I should call initialize() right after deserialization, // but since this specific type is used in Components we delay initialization until Component - // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component + // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component // purposes (you'll need to call initialize manually). } diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsLightRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsLightRTTI.h index be84c317d..549b48003 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsLightRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsLightRTTI.h @@ -32,15 +32,11 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mShadowBias, 12) BS_END_RTTI_MEMBERS public: - LightRTTI() - :mInitMembers(this) - { } - void onDeserializationEnded(IReflectable* obj, const UnorderedMap& params) override { // Note: Since this is a CoreObject I should call initialize() right after deserialization, // but since this specific type is used in Components we delay initialization until Component - // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component + // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component // purposes (you'll need to call initialize manually). } @@ -63,4 +59,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsMaterialParamsRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsMaterialParamsRTTI.h index dd2455c08..157bd2f23 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsMaterialParamsRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsMaterialParamsRTTI.h @@ -23,10 +23,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(isLoadStore, 1) BS_RTTI_MEMBER_PLAIN(surface, 2) BS_END_RTTI_MEMBERS - - MaterialParamTextureDataRTTI() - :mInitMembers(this) - { } const String& getRTTIName() override { @@ -309,4 +305,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsMeshImportOptionsRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsMeshImportOptionsRTTI.h index fa6544dff..68cf6c2e9 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsMeshImportOptionsRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsMeshImportOptionsRTTI.h @@ -32,10 +32,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mImportRootMotion, 11) BS_END_RTTI_MEMBERS public: - MeshImportOptionsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "MeshImportOptions"; @@ -61,10 +57,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(events, 1) BS_END_RTTI_MEMBERS public: - ImportedAnimationEventsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "ImportedAnimationEvents"; @@ -92,10 +84,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(isAdditive, 3) BS_END_RTTI_MEMBERS public: - AnimationSplitInfoRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "AnimationSplitInfo"; @@ -115,4 +103,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsMeshRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsMeshRTTI.h index 7bc943dca..472e72be8 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsMeshRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsMeshRTTI.h @@ -44,7 +44,6 @@ namespace bs public: MeshRTTI() - :mInitMembers(this) { addReflectablePtrField("mMeshData", 3, &MeshRTTI::getMeshData, &MeshRTTI::setMeshData); } @@ -74,4 +73,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsMorphShapesRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsMorphShapesRTTI.h index 60f4d5d5a..721b0de38 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsMorphShapesRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsMorphShapesRTTI.h @@ -21,12 +21,8 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mWeight, 1) BS_RTTI_MEMBER_PLAIN_ARRAY(mVertices, 2) BS_END_RTTI_MEMBERS - - public: - MorphShapeRTTI() - :mInitMembers(this) - { } + public: const String& getRTTIName() override { static String name = "MorphShape"; @@ -53,10 +49,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - MorphChannelRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "MorphChannel"; @@ -83,10 +75,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - MorphShapesRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "MorphShapes"; @@ -108,4 +96,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsPassRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsPassRTTI.h index 694a2696b..d52edc4be 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsPassRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsPassRTTI.h @@ -28,9 +28,9 @@ namespace bs return *this; } - + /************************************************************************/ - /* RTTI */ + /* RTTI */ /************************************************************************/ public: friend class SerializedGpuProgramDataRTTI; @@ -51,10 +51,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - SerializedGpuProgramDataRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "SerializedGpuProgramData"; @@ -170,7 +166,6 @@ namespace bs } public: PassRTTI() - :mInitMembers(this) { addReflectableField("mVertexProgramDesc", 3, &PassRTTI::getVertexProgramDesc, &PassRTTI::setVertexProgramDesc); addReflectableField("mFragmentProgramDesc", 4, &PassRTTI::getFragmentProgramDesc, &PassRTTI::setFragmentProgramDesc); @@ -257,4 +252,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsPhysicsMeshRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsPhysicsMeshRTTI.h index ff1efa004..6f7efa2cf 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsPhysicsMeshRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsPhysicsMeshRTTI.h @@ -22,10 +22,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - PhysicsMeshRTTI() - :mInitMembers(this) - { } - void onDeserializationEnded(IReflectable* obj, const UnorderedMap& params) override { PhysicsMesh* mesh = static_cast(obj); @@ -59,10 +55,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mType, 0) BS_END_RTTI_MEMBERS public: - FPhysicsMeshRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "FPhysicsMesh"; @@ -83,4 +75,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsPrefabDiffRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsPrefabDiffRTTI.h index e67be8aed..d0c62b875 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsPrefabDiffRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsPrefabDiffRTTI.h @@ -24,10 +24,6 @@ namespace bs BS_RTTI_MEMBER_REFLPTR(data, 1) BS_END_RTTI_MEMBERS public: - PrefabComponentDiffRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "PrefabComponentDiff"; @@ -67,10 +63,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(soFlags, 12) BS_END_RTTI_MEMBERS public: - PrefabObjectDiffRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "PrefabObjectDiff"; @@ -102,10 +94,6 @@ namespace bs BS_RTTI_MEMBER_REFLPTR(mRoot, 0) BS_END_RTTI_MEMBERS public: - PrefabDiffRTTI() - :mInitMembers(this) - { } - void onDeserializationStarted(IReflectable* obj, const UnorderedMap& params) override { PrefabDiff* prefabDiff = static_cast(obj); @@ -250,4 +238,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsPrefabRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsPrefabRTTI.h index 744b179fd..eac06bd1e 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsPrefabRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsPrefabRTTI.h @@ -29,7 +29,6 @@ namespace bs public: PrefabRTTI() - :mInitMembers(this) { addReflectablePtrField("mRoot", 0, &PrefabRTTI::getSceneObject, &PrefabRTTI::setSceneObject); } @@ -61,4 +60,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsReflectionProbeRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsReflectionProbeRTTI.h index 10e3cb454..cf84e0ceb 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsReflectionProbeRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsReflectionProbeRTTI.h @@ -29,10 +29,6 @@ namespace bs BS_RTTI_MEMBER_REFLPTR(mFilteredTexture, 8) BS_END_RTTI_MEMBERS public: - ReflectionProbeRTTI() - :mInitMembers(this) - { } - void onSerializationStarted(IReflectable* obj, const UnorderedMap& params) override { ReflectionProbe* probe = static_cast(obj); @@ -46,7 +42,7 @@ namespace bs { // Note: Since this is a CoreObject I should call initialize() right after deserialization, // but since this specific type is used in Components we delay initialization until Component - // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component + // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component // purposes (you'll need to call initialize manually). } diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsRenderSettingsRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsRenderSettingsRTTI.h index 3ccfa880e..8d9209659 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsRenderSettingsRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsRenderSettingsRTTI.h @@ -28,10 +28,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - AutoExposureSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "AutoExposureSettings"; @@ -63,10 +59,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - TonemappingSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "TonemappingSettings"; @@ -93,10 +85,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - WhiteBalanceSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "WhiteBalanceSettings"; @@ -125,10 +113,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - ColorGradingSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "ColorGradingSettings"; @@ -160,10 +144,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - DepthOfFieldSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "DepthOfFieldSettings"; @@ -196,10 +176,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - AmbientOcclusionSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "AmbientOcclusionSettings"; @@ -228,10 +204,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - ScreenSpaceReflectionsSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "ScreenSpaceReflectionsSettings"; @@ -260,10 +232,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - ShadowSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "ShadowSettings"; @@ -304,12 +272,8 @@ namespace bs BS_RTTI_MEMBER_PLAIN(enableIndirectLighting, 16) BS_RTTI_MEMBER_REFL(shadowSettings, 17) BS_END_RTTI_MEMBERS - - public: - RenderSettingsRTTI() - :mInitMembers(this) - { } + public: const String& getRTTIName() override { static String name = "RenderSettings"; @@ -329,4 +293,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsRenderableRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsRenderableRTTI.h index 557d1f397..aafab0e93 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsRenderableRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsRenderableRTTI.h @@ -26,15 +26,11 @@ namespace bs BS_END_RTTI_MEMBERS public: - RenderableRTTI() - :mInitMembers(this) - { } - void onDeserializationEnded(IReflectable* obj, const UnorderedMap& params) override { // Note: Since this is a CoreObject I should call initialize() right after deserialization, // but since this specific type is used in Components we delay initialization until Component - // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component + // itself does it. Keep this is mind in case this ever needs to be deserialized for non-Component // purposes (you'll need to call initialize manually). } @@ -57,4 +53,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsSavedResourceDataRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsSavedResourceDataRTTI.h index 871b58baa..cb1685d31 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsSavedResourceDataRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsSavedResourceDataRTTI.h @@ -23,10 +23,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - SavedResourceDataRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "ResourceDependencies"; @@ -46,4 +42,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsShaderRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsShaderRTTI.h index f66a7eec2..db697962b 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsShaderRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsShaderRTTI.h @@ -177,10 +177,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - SubShaderRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "SubShader"; @@ -279,7 +275,6 @@ namespace bs public: ShaderRTTI() - :mInitMembers(this) { addPlainArrayField("mDataParams", 2, &ShaderRTTI::getDataParam, &ShaderRTTI::getDataParamsArraySize, &ShaderRTTI::setDataParam, &ShaderRTTI::setDataParamsArraySize); @@ -347,4 +342,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsShaderVariationRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsShaderVariationRTTI.h index c480a8510..c0ed2c32c 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsShaderVariationRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsShaderVariationRTTI.h @@ -72,12 +72,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mParams, 0) BS_END_RTTI_MEMBERS public: - ShaderVariationRTTI() - :mInitMembers(this) - { - - } - const String& getRTTIName() override { static String name = "ShaderVariation"; diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsSkyboxRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsSkyboxRTTI.h index 5ba8ea3d4..7362a036d 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsSkyboxRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsSkyboxRTTI.h @@ -24,10 +24,6 @@ namespace bs BS_RTTI_MEMBER_REFLPTR(mIrradiance, 3) BS_END_RTTI_MEMBERS public: - SkyboxRTTI() - :mInitMembers(this) - { } - void onSerializationStarted(IReflectable* obj, const UnorderedMap& params) override { Skybox* skybox = static_cast(obj); diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsTechniqueRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsTechniqueRTTI.h index 432cfca47..be3a748f7 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsTechniqueRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsTechniqueRTTI.h @@ -25,10 +25,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - TechniqueRTTI() - :mInitMembers(this) - { } - void onDeserializationEnded(IReflectable* obj, const UnorderedMap& params) override { Technique* technique = static_cast(obj); @@ -54,4 +50,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsTextureImportOptionsRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsTextureImportOptionsRTTI.h index 508c2c5cf..2e8228603 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsTextureImportOptionsRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsTextureImportOptionsRTTI.h @@ -27,10 +27,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - TextureImportOptionsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "TextureImportOptions"; @@ -50,4 +46,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsTextureRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsTextureRTTI.h index 1da9579d2..01f3813ab 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsTextureRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsTextureRTTI.h @@ -84,7 +84,6 @@ namespace bs public: TextureRTTI() - :mInitMembers(this) { addPlainField("mUsage", 11, &TextureRTTI::getUsage, &TextureRTTI::setUsage); @@ -164,4 +163,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsTransformRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsTransformRTTI.h index 6560f5b7a..b21f87c5e 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsTransformRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsTransformRTTI.h @@ -23,10 +23,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - TransformRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "Transform"; diff --git a/Source/Foundation/bsfCore/Private/RTTI/BsViewportRTTI.h b/Source/Foundation/bsfCore/Private/RTTI/BsViewportRTTI.h index 088c0ee77..04b6b8c7d 100644 --- a/Source/Foundation/bsfCore/Private/RTTI/BsViewportRTTI.h +++ b/Source/Foundation/bsfCore/Private/RTTI/BsViewportRTTI.h @@ -24,10 +24,6 @@ namespace bs BS_RTTI_MEMBER_PLAIN(mClearFlags, 4) BS_END_RTTI_MEMBERS public: - ViewportRTTI() - :mInitMembers(this) - { } - void onDeserializationEnded(IReflectable* obj, const UnorderedMap& params) override { Viewport* viewport = static_cast(obj); @@ -53,4 +49,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfEngine/Private/RTTI/BsGUIElementStyleRTTI.h b/Source/Foundation/bsfEngine/Private/RTTI/BsGUIElementStyleRTTI.h index 234041df4..b914eed87 100644 --- a/Source/Foundation/bsfEngine/Private/RTTI/BsGUIElementStyleRTTI.h +++ b/Source/Foundation/bsfEngine/Private/RTTI/BsGUIElementStyleRTTI.h @@ -58,12 +58,8 @@ namespace bs BS_RTTI_MEMBER_PLAIN(subStyles, 34) BS_END_RTTI_MEMBERS - - public: - GUIElementStyleRTTI() - :mInitMembers(this) - { } + public: const String& getRTTIName() override { static String name = "GUIElementStyle"; @@ -83,4 +79,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfEngine/Private/RTTI/BsGameSettingsRTTI.h b/Source/Foundation/bsfEngine/Private/RTTI/BsGameSettingsRTTI.h index f85ba982f..f6b493726 100644 --- a/Source/Foundation/bsfEngine/Private/RTTI/BsGameSettingsRTTI.h +++ b/Source/Foundation/bsfEngine/Private/RTTI/BsGameSettingsRTTI.h @@ -26,10 +26,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - GameSettingsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "GameSettings"; @@ -49,4 +45,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfEngine/Private/RTTI/BsResourceMappingRTTI.h b/Source/Foundation/bsfEngine/Private/RTTI/BsResourceMappingRTTI.h index 91616cb95..427cfd2e3 100644 --- a/Source/Foundation/bsfEngine/Private/RTTI/BsResourceMappingRTTI.h +++ b/Source/Foundation/bsfEngine/Private/RTTI/BsResourceMappingRTTI.h @@ -21,10 +21,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - ResourceMappingRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "ResourceMapping"; @@ -44,4 +40,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfEngine/Private/RTTI/BsScriptCodeImportOptionsRTTI.h b/Source/Foundation/bsfEngine/Private/RTTI/BsScriptCodeImportOptionsRTTI.h index eb137a499..ee9bc0d84 100644 --- a/Source/Foundation/bsfEngine/Private/RTTI/BsScriptCodeImportOptionsRTTI.h +++ b/Source/Foundation/bsfEngine/Private/RTTI/BsScriptCodeImportOptionsRTTI.h @@ -21,10 +21,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - ScriptCodeImportOptionsRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "ScriptCodeImportOptions"; @@ -44,4 +40,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfEngine/Private/RTTI/BsScriptCodeRTTI.h b/Source/Foundation/bsfEngine/Private/RTTI/BsScriptCodeRTTI.h index 7cb8c6384..85c5d74e8 100644 --- a/Source/Foundation/bsfEngine/Private/RTTI/BsScriptCodeRTTI.h +++ b/Source/Foundation/bsfEngine/Private/RTTI/BsScriptCodeRTTI.h @@ -22,10 +22,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - ScriptCodeRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "ScriptCode"; @@ -45,4 +41,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfEngine/Private/RTTI/BsSpriteTextureRTTI.h b/Source/Foundation/bsfEngine/Private/RTTI/BsSpriteTextureRTTI.h index 45561a5ad..772bf4063 100644 --- a/Source/Foundation/bsfEngine/Private/RTTI/BsSpriteTextureRTTI.h +++ b/Source/Foundation/bsfEngine/Private/RTTI/BsSpriteTextureRTTI.h @@ -23,10 +23,6 @@ namespace bs BS_END_RTTI_MEMBERS public: - SpriteTextureRTTI() - :mInitMembers(this) - { } - const String& getRTTIName() override { static String name = "SpriteTexture"; @@ -46,4 +42,4 @@ namespace bs /** @} */ /** @endcond */ -} \ No newline at end of file +} diff --git a/Source/Foundation/bsfUtility/Private/RTTI/BsIReflectableRTTI.h b/Source/Foundation/bsfUtility/Private/RTTI/BsIReflectableRTTI.h index fb1592492..e2bf254bb 100644 --- a/Source/Foundation/bsfUtility/Private/RTTI/BsIReflectableRTTI.h +++ b/Source/Foundation/bsfUtility/Private/RTTI/BsIReflectableRTTI.h @@ -15,8 +15,6 @@ namespace bs class BS_UTILITY_EXPORT IReflectableRTTI : public RTTIType { public: - IReflectableRTTI() = default; - const String& getRTTIName() override { static String name = "IReflectable"; diff --git a/Source/Foundation/bsfUtility/Private/RTTI/BsSerializedObjectRTTI.h b/Source/Foundation/bsfUtility/Private/RTTI/BsSerializedObjectRTTI.h index b9a236071..a71202f69 100644 --- a/Source/Foundation/bsfUtility/Private/RTTI/BsSerializedObjectRTTI.h +++ b/Source/Foundation/bsfUtility/Private/RTTI/BsSerializedObjectRTTI.h @@ -17,8 +17,6 @@ namespace bs class BS_UTILITY_EXPORT SerializedInstanceRTTI : public RTTIType { public: - SerializedInstanceRTTI() = default; - const String& getRTTIName() override { static String name = "SerializedInstance"; diff --git a/Source/Foundation/bsfUtility/Reflection/BsRTTIType.h b/Source/Foundation/bsfUtility/Reflection/BsRTTIType.h index b61c17bf7..da603f049 100644 --- a/Source/Foundation/bsfUtility/Reflection/BsRTTIType.h +++ b/Source/Foundation/bsfUtility/Reflection/BsRTTIType.h @@ -23,7 +23,7 @@ namespace bs /** * Starts definitions for member fields within a RTTI type. Follow this with calls to BS_RTTI_MEMBER* calls, and finish by - * calling BS_END_RTTI_MEMBERS. You must also initialize mInitMembers field in the parent class' constructor. + * calling BS_END_RTTI_MEMBERS. */ #define BS_BEGIN_RTTI_MEMBERS \ struct META_FirstEntry {}; \ @@ -274,7 +274,7 @@ namespace bs } \ }; \ \ - META_InitAllMembers mInitMembers; + META_InitAllMembers mInitMembers{this}; /** @} */